diff options
Diffstat (limited to 'tests/modules')
-rw-r--r-- | tests/modules/m9627/a.nim | 1 | ||||
-rw-r--r-- | tests/modules/m9627/b.nim | 1 | ||||
-rw-r--r-- | tests/modules/t8665.nim | 4 | ||||
-rw-r--r-- | tests/modules/t9627.nim | 7 | ||||
-rw-r--r-- | tests/modules/texport2.nim | 9 | ||||
-rw-r--r-- | tests/modules/timportas.nim | 8 | ||||
-rw-r--r-- | tests/modules/timportexcept.nim | 3 | ||||
-rw-r--r-- | tests/modules/tmismatchedvisibility.nim | 2 | ||||
-rw-r--r-- | tests/modules/tnamspc.nim | 4 | ||||
-rw-r--r-- | tests/modules/tnotuniquename.nim | 2 | ||||
-rw-r--r-- | tests/modules/tnotuniquename2.nim | 2 | ||||
-rw-r--r-- | tests/modules/topaque.nim | 4 | ||||
-rw-r--r-- | tests/modules/trecinca.nim | 4 | ||||
-rw-r--r-- | tests/modules/trecincb.nim | 4 | ||||
-rw-r--r-- | tests/modules/trecmod.nim | 2 | ||||
-rw-r--r-- | tests/modules/tselfimport.nim | 3 |
16 files changed, 35 insertions, 25 deletions
diff --git a/tests/modules/m9627/a.nim b/tests/modules/m9627/a.nim new file mode 100644 index 000000000..0dd32430e --- /dev/null +++ b/tests/modules/m9627/a.nim @@ -0,0 +1 @@ +var a = 10 diff --git a/tests/modules/m9627/b.nim b/tests/modules/m9627/b.nim new file mode 100644 index 000000000..2806a78ed --- /dev/null +++ b/tests/modules/m9627/b.nim @@ -0,0 +1 @@ +var b = 9 diff --git a/tests/modules/t8665.nim b/tests/modules/t8665.nim index 51538df79..74d31452f 100644 --- a/tests/modules/t8665.nim +++ b/tests/modules/t8665.nim @@ -1 +1,5 @@ +discard """ + action: compile +""" + import treorder diff --git a/tests/modules/t9627.nim b/tests/modules/t9627.nim new file mode 100644 index 000000000..daba46374 --- /dev/null +++ b/tests/modules/t9627.nim @@ -0,0 +1,7 @@ +discard """ + output: "109" +""" + +include m9627 / [a, b] + +echo a, b diff --git a/tests/modules/texport2.nim b/tests/modules/texport2.nim index 6e55873c5..e90c58673 100644 --- a/tests/modules/texport2.nim +++ b/tests/modules/texport2.nim @@ -1,9 +1,16 @@ +discard """ +output: ''' +abc +xyz +B.foo +''' +""" + # bug #1595, #1612 import mexport2a proc main() = - echo "Import Test, two lines should follow. One with abc and one with xyz." printAbc() printXyz() diff --git a/tests/modules/timportas.nim b/tests/modules/timportas.nim index a92162117..2f7bf7f6a 100644 --- a/tests/modules/timportas.nim +++ b/tests/modules/timportas.nim @@ -10,7 +10,7 @@ import times as bar3 except convert import definitions as baz discard foo.v -discard bar.now -discard bar2.now -discard bar3.now -discard baz.v \ No newline at end of file +discard bar.now() +discard bar2.now() +discard bar3.now() +discard baz.v diff --git a/tests/modules/timportexcept.nim b/tests/modules/timportexcept.nim index 93a7fd642..40b748088 100644 --- a/tests/modules/timportexcept.nim +++ b/tests/modules/timportexcept.nim @@ -1,10 +1,9 @@ discard """ - line: 9 errormsg: "undeclared identifier: '%'" + line: 9 """ import strutils except `%` # doesn't work echo "$1" % "abc" - diff --git a/tests/modules/tmismatchedvisibility.nim b/tests/modules/tmismatchedvisibility.nim index 2e8636d1e..4bf244807 100644 --- a/tests/modules/tmismatchedvisibility.nim +++ b/tests/modules/tmismatchedvisibility.nim @@ -1,6 +1,6 @@ discard """ - line: 8 errormsg: "public implementation 'tmismatchedvisibility.foo(a: int)[declared in tmismatchedvisibility.nim(6, 5)]' has non-public forward declaration in " + line: 8 """ proc foo(a: int): int diff --git a/tests/modules/tnamspc.nim b/tests/modules/tnamspc.nim index 2f488644c..93ce71568 100644 --- a/tests/modules/tnamspc.nim +++ b/tests/modules/tnamspc.nim @@ -1,12 +1,10 @@ discard """ + errormsg: "undeclared identifier: \'global\'" file: "tnamspc.nim" line: 10 - errormsg: "undeclared identifier: \'global\'" """ # Test17 - test correct handling of namespaces import mnamspc1 global = 9 #ERROR - - diff --git a/tests/modules/tnotuniquename.nim b/tests/modules/tnotuniquename.nim index 2d8ce4869..403c8a47e 100644 --- a/tests/modules/tnotuniquename.nim +++ b/tests/modules/tnotuniquename.nim @@ -1,6 +1,6 @@ discard """ - file: "tnotuniquename/mnotuniquename.nim" errormsg: "module names need to be unique per Nimble package" + file: "tnotuniquename/mnotuniquename.nim" """ import mnotuniquename diff --git a/tests/modules/tnotuniquename2.nim b/tests/modules/tnotuniquename2.nim index 8e486d19f..7aa4de515 100644 --- a/tests/modules/tnotuniquename2.nim +++ b/tests/modules/tnotuniquename2.nim @@ -1,6 +1,6 @@ discard """ - file: "tnotuniquename/mnotuniquename.nim" errormsg: "module names need to be unique per Nimble package" + file: "tnotuniquename/mnotuniquename.nim" """ import mnotuniquename diff --git a/tests/modules/topaque.nim b/tests/modules/topaque.nim index 84e2388bc..94ff8ff25 100644 --- a/tests/modules/topaque.nim +++ b/tests/modules/topaque.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "undeclared field: \'buffer\'" file: "topaque.nim" line: 16 - errormsg: "undeclared field: \'buffer\'" """ # Test the new opaque types @@ -14,5 +14,3 @@ var L.filename = "ha" L.line = 34 L.buffer[0] = '\0' #ERROR_MSG undeclared field: 'buffer' - - diff --git a/tests/modules/trecinca.nim b/tests/modules/trecinca.nim index 7a74d7a46..56798dedd 100644 --- a/tests/modules/trecinca.nim +++ b/tests/modules/trecinca.nim @@ -1,12 +1,10 @@ discard """ + errormsg: "recursive dependency: 'trecincb.nim'" file: "trecincb.nim" line: 9 - errormsg: "recursive dependency: 'trecincb.nim'" """ # Test recursive includes include trecincb echo "trecina" - - diff --git a/tests/modules/trecincb.nim b/tests/modules/trecincb.nim index 1d3eb5503..30a5d7800 100644 --- a/tests/modules/trecincb.nim +++ b/tests/modules/trecincb.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "recursive dependency: 'trecincb.nim'" file: "trecincb.nim" line: 9 - errormsg: "recursive dependency: 'trecincb.nim'" """ # Test recursive includes @@ -9,5 +9,3 @@ discard """ include trecincb echo "trecinb" - - diff --git a/tests/modules/trecmod.nim b/tests/modules/trecmod.nim index 5f053bcae..43e510e87 100644 --- a/tests/modules/trecmod.nim +++ b/tests/modules/trecmod.nim @@ -1,7 +1,7 @@ discard """ + errormsg: "recursive module dependency detected" file: "mrecmod.nim" line: 1 - errormsg: "recursive module dependency detected" disabled: true """ # recursive module diff --git a/tests/modules/tselfimport.nim b/tests/modules/tselfimport.nim index ddb3a5b09..7e50bef7c 100644 --- a/tests/modules/tselfimport.nim +++ b/tests/modules/tselfimport.nim @@ -1,9 +1,8 @@ discard """ + errormsg: "A module cannot import itself" file: "tselfimport.nim" line: 7 - errormsg: "A module cannot import itself" """ import strutils as su # guard against regression import tselfimport #ERROR echo("Hello World") - |