Skip remaining LSP tests
This commit is contained in:
		
							parent
							
								
									9636d28d2a
								
							
						
					
					
						commit
						9bda3dc943
					
				| 
						 | 
					@ -43,9 +43,9 @@ export interface LangConfig {
 | 
				
			||||||
    init?: any;
 | 
					    init?: any;
 | 
				
			||||||
    config?: any;
 | 
					    config?: any;
 | 
				
			||||||
    lang?: string;
 | 
					    lang?: string;
 | 
				
			||||||
    code?: string; // FIXME
 | 
					    code?: string; // required unless test is skipped
 | 
				
			||||||
    after?: string;
 | 
					    after?: string;
 | 
				
			||||||
    item?: string; // FIXME
 | 
					    item?: string; // required unless test is skipped
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  template: string;
 | 
					  template: string;
 | 
				
			||||||
  timeout?: number;
 | 
					  timeout?: number;
 | 
				
			||||||
| 
						 | 
					@ -370,6 +370,7 @@ int main() {
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  ceylon: {
 | 
					  ceylon: {
 | 
				
			||||||
    name: "Ceylon",
 | 
					    name: "Ceylon",
 | 
				
			||||||
| 
						 | 
					@ -532,6 +533,7 @@ int main() {
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  crystal: {
 | 
					  crystal: {
 | 
				
			||||||
    aliases: ["cr"],
 | 
					    aliases: ["cr"],
 | 
				
			||||||
| 
						 | 
					@ -581,6 +583,7 @@ int main() {
 | 
				
			||||||
    lsp: { start: "clojure-lsp" },
 | 
					    lsp: { start: "clojure-lsp" },
 | 
				
			||||||
    template: `(println "Hello, world!")
 | 
					    template: `(println "Hello, world!")
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  clojurescript: {
 | 
					  clojurescript: {
 | 
				
			||||||
    aliases: ["cljs", "lumo"],
 | 
					    aliases: ["cljs", "lumo"],
 | 
				
			||||||
| 
						 | 
					@ -702,7 +705,7 @@ end`,
 | 
				
			||||||
    lsp: { start: "/opt/elixir-ls/language_server.sh" },
 | 
					    lsp: { start: "/opt/elixir-ls/language_server.sh" },
 | 
				
			||||||
    template: `IO.puts("Hello, world!")
 | 
					    template: `IO.puts("Hello, world!")
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
    skip: ["repl", "runrepl", "scope"],
 | 
					    skip: ["repl", "runrepl", "scope", "lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  elm: {
 | 
					  elm: {
 | 
				
			||||||
    name: "Elm",
 | 
					    name: "Elm",
 | 
				
			||||||
| 
						 | 
					@ -723,6 +726,7 @@ Main.x`,
 | 
				
			||||||
output : String
 | 
					output : String
 | 
				
			||||||
output = "Hello, world!"
 | 
					output = "Hello, world!"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  elvish: {
 | 
					  elvish: {
 | 
				
			||||||
    aliases: ["elv"],
 | 
					    aliases: ["elv"],
 | 
				
			||||||
| 
						 | 
					@ -803,6 +807,7 @@ x() -> 123 * 234.
 | 
				
			||||||
main() ->
 | 
					main() ->
 | 
				
			||||||
    io:fwrite("Hello, world!\\n").
 | 
					    io:fwrite("Hello, world!\\n").
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  euphoria: {
 | 
					  euphoria: {
 | 
				
			||||||
    aliases: ["ex", "exw", "exu", "euc", "eui", "eub"],
 | 
					    aliases: ["ex", "exw", "exu", "euc", "eui", "eub"],
 | 
				
			||||||
| 
						 | 
					@ -879,6 +884,7 @@ USE: io
 | 
				
			||||||
          print *, "Hello, world!"
 | 
					          print *, "Hello, world!"
 | 
				
			||||||
       end program hello
 | 
					       end program hello
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  fsharp: {
 | 
					  fsharp: {
 | 
				
			||||||
    aliases: ["fsharpi", "fsx", "fs"],
 | 
					    aliases: ["fsharpi", "fsx", "fs"],
 | 
				
			||||||
| 
						 | 
					@ -923,6 +929,7 @@ func main() {
 | 
				
			||||||
	fmt.Println("Hello, world!")
 | 
						fmt.Println("Hello, world!")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  golfscript: {
 | 
					  golfscript: {
 | 
				
			||||||
    aliases: ["gs", "golf"],
 | 
					    aliases: ["gs", "golf"],
 | 
				
			||||||
| 
						 | 
					@ -995,6 +1002,7 @@ main =
 | 
				
			||||||
main :: IO ()
 | 
					main :: IO ()
 | 
				
			||||||
main = putStrLn "Hello, world!"
 | 
					main = putStrLn "Hello, world!"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  haxe: {
 | 
					  haxe: {
 | 
				
			||||||
    aliases: ["hx"],
 | 
					    aliases: ["hx"],
 | 
				
			||||||
| 
						 | 
					@ -1156,6 +1164,7 @@ PLEASE GIVE UP
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    template: `println("Hello, world!")
 | 
					    template: `println("Hello, world!")
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  kalyn: {
 | 
					  kalyn: {
 | 
				
			||||||
    name: "Kalyn",
 | 
					    name: "Kalyn",
 | 
				
			||||||
| 
						 | 
					@ -1273,6 +1282,7 @@ KTHXBYE
 | 
				
			||||||
    lsp: { start: "java -cp /usr/lib/EmmyLua-LS.jar com.tang.vscode.MainKt" },
 | 
					    lsp: { start: "java -cp /usr/lib/EmmyLua-LS.jar com.tang.vscode.MainKt" },
 | 
				
			||||||
    template: `print("Hello, world!")
 | 
					    template: `print("Hello, world!")
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  malbolge: {
 | 
					  malbolge: {
 | 
				
			||||||
    aliases: ["mb"],
 | 
					    aliases: ["mb"],
 | 
				
			||||||
| 
						 | 
					@ -1423,6 +1433,7 @@ int main() {
 | 
				
			||||||
  return 0;
 | 
					  return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  ocaml: {
 | 
					  ocaml: {
 | 
				
			||||||
    name: "OCaml",
 | 
					    name: "OCaml",
 | 
				
			||||||
| 
						 | 
					@ -1444,6 +1455,7 @@ let x = 123 * 234`,
 | 
				
			||||||
    template: `;;
 | 
					    template: `;;
 | 
				
			||||||
print_string "Hello, world!\\n"
 | 
					print_string "Hello, world!\\n"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  octave: {
 | 
					  octave: {
 | 
				
			||||||
    aliases: ["matlab", "m", "mathworks"],
 | 
					    aliases: ["matlab", "m", "mathworks"],
 | 
				
			||||||
| 
						 | 
					@ -1547,6 +1559,7 @@ end.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "Hello, world!\\n";
 | 
					echo "Hello, world!\\n";
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  pikachu: {
 | 
					  pikachu: {
 | 
				
			||||||
    aliases: [
 | 
					    aliases: [
 | 
				
			||||||
| 
						 | 
					@ -1603,7 +1616,7 @@ pipi pikachu
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    template: `Write-Host "Hello, world!"
 | 
					    template: `Write-Host "Hello, world!"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
    skip: ["repl", "runrepl", "scope"],
 | 
					    skip: ["repl", "runrepl", "scope", "lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  prolog: {
 | 
					  prolog: {
 | 
				
			||||||
    name: "Prolog",
 | 
					    name: "Prolog",
 | 
				
			||||||
| 
						 | 
					@ -1757,6 +1770,7 @@ x`,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    template: `print_string("Hello, world!\\n");
 | 
					    template: `print_string("Hello, world!\\n");
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  redis: {
 | 
					  redis: {
 | 
				
			||||||
    name: "Redis",
 | 
					    name: "Redis",
 | 
				
			||||||
| 
						 | 
					@ -1858,7 +1872,7 @@ binding_irb.run(IRB.conf)
 | 
				
			||||||
    lsp: { start: "solargraph stdio" },
 | 
					    lsp: { start: "solargraph stdio" },
 | 
				
			||||||
    template: `puts "Hello, world!"
 | 
					    template: `puts "Hello, world!"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
    skip: ["repl", "runrepl", "scope"],
 | 
					    skip: ["repl", "runrepl", "scope", "lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  rust: {
 | 
					  rust: {
 | 
				
			||||||
    aliases: ["rs", "rustc"],
 | 
					    aliases: ["rs", "rustc"],
 | 
				
			||||||
| 
						 | 
					@ -1872,6 +1886,7 @@ binding_irb.run(IRB.conf)
 | 
				
			||||||
    println!("Hello, world!");
 | 
					    println!("Hello, world!");
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  sass: {
 | 
					  sass: {
 | 
				
			||||||
    name: "Sass",
 | 
					    name: "Sass",
 | 
				
			||||||
| 
						 | 
					@ -2118,6 +2133,7 @@ END
 | 
				
			||||||
    lsp: { start: "sourcekit-lsp" },
 | 
					    lsp: { start: "sourcekit-lsp" },
 | 
				
			||||||
    template: `print("Hello, world!")
 | 
					    template: `print("Hello, world!")
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  tcl: {
 | 
					  tcl: {
 | 
				
			||||||
    aliases: ["tclsh", "tclshrc"],
 | 
					    aliases: ["tclsh", "tclshrc"],
 | 
				
			||||||
| 
						 | 
					@ -2170,6 +2186,7 @@ END
 | 
				
			||||||
    lsp: { start: "digestif", lang: "tex" },
 | 
					    lsp: { start: "digestif", lang: "tex" },
 | 
				
			||||||
    template: `\\message{Hello, world!}
 | 
					    template: `\\message{Hello, world!}
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  textile: {
 | 
					  textile: {
 | 
				
			||||||
    name: "Textile",
 | 
					    name: "Textile",
 | 
				
			||||||
| 
						 | 
					@ -2256,6 +2273,7 @@ a
 | 
				
			||||||
    lsp: { start: "vim-language-server --stdio" },
 | 
					    lsp: { start: "vim-language-server --stdio" },
 | 
				
			||||||
    template: `:echo "Hello, world!"
 | 
					    template: `:echo "Hello, world!"
 | 
				
			||||||
`,
 | 
					`,
 | 
				
			||||||
 | 
					    skip: ["lsp"],
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  vimwiki: {
 | 
					  vimwiki: {
 | 
				
			||||||
    name: "Vimwiki",
 | 
					    name: "Vimwiki",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -242,9 +242,9 @@ class Test {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
  testLsp = async () => {
 | 
					  testLsp = async () => {
 | 
				
			||||||
    const insertedCode = this.config.lsp!.code!; // FIXME
 | 
					    const insertedCode = this.config.lsp!.code!;
 | 
				
			||||||
    const after = this.config.lsp!.after;
 | 
					    const after = this.config.lsp!.after;
 | 
				
			||||||
    const item = this.config.lsp!.item!; // FIXME
 | 
					    const item = this.config.lsp!.item!;
 | 
				
			||||||
    const idx = after
 | 
					    const idx = after
 | 
				
			||||||
      ? this.config.template.indexOf(after) + after.length
 | 
					      ? this.config.template.indexOf(after) + after.length
 | 
				
			||||||
      : this.config.template.length;
 | 
					      : this.config.template.length;
 | 
				
			||||||
| 
						 | 
					@ -542,12 +542,20 @@ function lint(lang: string) {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  // These can be removed when the types are adjusted to make these
 | 
					  // These can be removed when the types are adjusted to make these
 | 
				
			||||||
  // situations impossible.
 | 
					  // situations impossible.
 | 
				
			||||||
  if (config.format && !config.format.input) {
 | 
					  if (
 | 
				
			||||||
 | 
					    config.format &&
 | 
				
			||||||
 | 
					    !config.format.input &&
 | 
				
			||||||
 | 
					    !(config.skip || []).includes("format")
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
    throw new Error("formatter is missing test");
 | 
					    throw new Error("formatter is missing test");
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  // if (config.lsp && !(config.lsp.code && config.lsp.item)) {
 | 
					  if (
 | 
				
			||||||
  //   throw new Error("LSP is missing test");
 | 
					    config.lsp &&
 | 
				
			||||||
  // }
 | 
					    !(config.lsp.code && config.lsp.item) &&
 | 
				
			||||||
 | 
					    !(config.skip || []).includes("lsp")
 | 
				
			||||||
 | 
					  ) {
 | 
				
			||||||
 | 
					    throw new Error("LSP is missing test");
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const testTypes: {
 | 
					const testTypes: {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue