Tester tests (#9787)

* remove --lib:lib
* added some tests for testatment
* tests are addad WIP: add colors switch to tester
* meta tester is integrated
This commit is contained in:
Arne Döring 2018-11-27 10:00:32 +01:00 • committed by Andreas Rumpf
commit cc0364e72f
15 changed files with 164 additions and 21 deletions

View file

@ -0,0 +1,8 @@
discard """
ccodecheck: "baz"
"""
proc foo(): void {.exportc: "bar".}=
echo "Hello World"
foo()

View file

@ -0,0 +1,8 @@
discard """
line: 8
column: 7
errormsg: "undeclared identifier: 'undeclared'"
"""
# test should fail because the line directive is wrong
echo undeclared

View file

@ -0,0 +1,8 @@
discard """
line: 8
column: 6
errormsg: "wrong error message"
"""
# test should fail because the line directive is wrong
echo undeclared

View file

@ -0,0 +1,3 @@
discard """
exitcode: 1
"""

View file

@ -0,0 +1,6 @@
discard """
file: "notthisfile.nim"
errmsg: "undeclared identifier: 'undefined'"
"""
echo undefined

View file

@ -0,0 +1,8 @@
discard """
line: 9
column: 6
errormsg: "undeclared identifier: 'undeclared'"
"""
# test should fail because the line directive is wrong
echo undeclared

View file

@ -0,0 +1,5 @@
discard """
maxcodesize: 1
"""
echo "Hello World"

View file

@ -0,0 +1,6 @@
discard """
msg: "Hello World"
"""
static:
echo "something else"

View file

@ -0,0 +1,7 @@
discard """
nimout: "Hello World!"
action: compile
"""
static:
echo "something else"

View file

@ -0,0 +1,7 @@
discard """
output: '''
done
'''
"""
echo "broken"

View file

@ -0,0 +1,5 @@
discard """
outputsub: "something else"
"""
echo "Hello World!"

View file

@ -0,0 +1,11 @@
discard """
sortoutput: true
output: '''
2
1
'''
"""
# this test should ensure that the output is actually sorted
echo "2"
echo "1"