Skip to content

Commit

Permalink
add many test commands
Browse files Browse the repository at this point in the history
  • Loading branch information
xavdid committed Jul 21, 2023
1 parent 540bef5 commit fc6b22c
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workspace/exercise_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestMissingExerciseConfig(t *testing.T) {

_, err = NewExerciseConfig(dir)
assert.Error(t, err)
// this error message has to show up across all platforms, so be vague
// any assertions about this error message have to work across all platforms, so be vague
// unix: ".exercism/config.json: no such file or directory"
// windows: "open .exercism\config.json: The system cannot find the path specified."
assert.Contains(t, err.Error(), path.Join(".exercism", "config.json:"))
Expand Down
107 changes: 105 additions & 2 deletions workspace/test_configurations.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,116 @@ var TestConfigurations = map[string]TestConfiguration{
"elm": {
Command: "elm-test",
},
"emacs-lisp": {
Command: "emacs -batch -l ert -l *-test.el -f ert-run-tests-batch-and-exit",
},
"erlang": {
Command: "rebar3 eunit",
},
"fsharp": {
Command: "dotnet test",
},
"gleam": {
Command: "gleam test",
},
"go": {
Command: "go test",
},
"rust": {
Command: "cargo test --",
"groovy": {
Command: "gradle test",
},
"haskell": {
Command: "stack test",
},
"java": {
Command: "gradle test",
},
"javascript": {
Command: "npm run test",
},
"julia": {
Command: "julia runtests.jl",
},
"kotlin": {
Command: "./gradlew test",
WindowsCommand: "gradlew.bat test",
},
"lfe": {
Command: "make test",
},
"lua": {
Command: "busted",
},
"mips": {
Command: "java -jar /path/to/mars.jar nc runner.mips impl.mips",
},
"nim": {
Command: "nim r {{test_files}}",
},
"ocaml": {
Command: "make",
},
"perl5": {
Command: "prove .",
},
"php": {
Command: "phpunit {{test_files}}",
},
"purescript": {
Command: "spago test",
},
"python": {
Command: "python3 -m pytest -o markers=task {{test_files}}",
},
"racket": {
Command: "raco test {{test_files}}",
},
"raku": {
Command: "prove6 {{test_files}}",
},
"reasonml": {
Command: "npm run test",
},
"red": {
Command: "red {{test_files}}",
},
"ruby": {
Command: "ruby {{test_files}}",
},
"rust": {
Command: "cargo test --",
},
"scala": {
Command: "sbt test",
},
"sml": {
Command: "poly -q --use {{test_files}}",
},
"swift": {
Command: "swift test",
},
"tcl": {
Command: "tclsh {{test_files}}",
},
"typescript": {
Command: "yarn test",
},
"vbnet": {
Command: "dotnet test",
},
"vlang": {
Command: "v -stats test run_test.v",
},
"wasm": {
Command: "npm run test",
},
"wren": {
Command: "wrenc {{test_files}}",
},
"x86-64-assembly": {
Command: "make",
},
"zig": {
Command: "zig test {{test_files}}",
},
}

0 comments on commit fc6b22c

Please sign in to comment.