Add test running wrappers

This commit is contained in:
Erik Simmler 2016-05-13 17:05:18 -04:00
parent 7ddb1b57c6
commit cb3e064605
52 changed files with 151 additions and 7 deletions

1
.gitignore vendored
View file

@ -4,3 +4,4 @@ bin/configlet
bin/configlet.exe bin/configlet.exe
elm-stuff elm-stuff
CHECKLIST CHECKLIST
build.js

View file

@ -11,7 +11,8 @@ do
mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm" mv "$exercise_dir/$exercise.example" "$exercise_dir/$exercise.elm"
echo '-------------------------------------------------------' echo '-------------------------------------------------------'
echo "Testing $exercise" echo "Testing $exercise"
elm-test $exercise_dir/*Tests.elm
elm-make $exercise_dir/*Tests.elm --output build.js && node build.js
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
TEST_RESULT=1 TEST_RESULT=1

View file

@ -2,8 +2,8 @@
The simplest way to install Elm is via Node.js/NPM. The simplest way to install Elm is via Node.js/NPM.
If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform and elm-test. If you don't already have Node.js installed on your computer, you can download it from [the official site](https://nodejs.org/). Once you have Node.js up and running, follow these steps to install the Elm platform.
```bash ```bash
$ npm install --global elm elm-test $ npm install --global elm
``` ```

View file

@ -1,12 +1,10 @@
Elm exercises within your exercism project directory can be run by changing to the exercise directory, and running `elm-test NameOfTests.elm`. Elm exercises within your exercism project directory can be run by changing to the exercise directory, and running `./runtests.sh` (or `runtests.bat` on Windows).
```bash ```bash
$ cd exercism/project/directory/elm/hello-world $ cd exercism/project/directory/elm/hello-world
$ elm-test HelloWorldTests.elm $ ./runtests.sh
``` ```
When you first run `elm-test` for an exercise it will prompt you to install the test library dependencies. If you type "y" and hit enter, the script should take care of the rest.
## Hints and tips ## Hints and tips
### Coding the exercise ### Coding the exercise

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/anagram/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/anagram/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/bob/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/bob/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/hamming/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/hamming/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/leap/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/leap/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/list-ops/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/pangram/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/pangram/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/series/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/series/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/strain/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/strain/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

4
exercises/sublist/runtests.bat Executable file
View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/sublist/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

2
exercises/triangle/runtests.sh Executable file
View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js

View file

@ -0,0 +1,4 @@
@echo off
for %%f in (*Tests.elm) do (
elm-make %%f --yes --output build.js && node build.js
)

View file

@ -0,0 +1,2 @@
#!/usr/bin/env bash
elm-make *Tests.elm --yes --output build.js && node build.js