summary refs log tree commit diff stats
path: root/tests/modules
diff options
context:
space:
mode:
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/m9627/a.nim1
-rw-r--r--tests/modules/m9627/b.nim1
-rw-r--r--tests/modules/t8665.nim4
-rw-r--r--tests/modules/t9627.nim7
-rw-r--r--tests/modules/texport2.nim9
-rw-r--r--tests/modules/timportas.nim8
-rw-r--r--tests/modules/timportexcept.nim3
-rw-r--r--tests/modules/tmismatchedvisibility.nim2
-rw-r--r--tests/modules/tnamspc.nim4
-rw-r--r--tests/modules/tnotuniquename.nim2
-rw-r--r--tests/modules/tnotuniquename2.nim2
-rw-r--r--tests/modules/topaque.nim4
-rw-r--r--tests/modules/trecinca.nim4
-rw-r--r--tests/modules/trecincb.nim4
-rw-r--r--tests/modules/trecmod.nim2
-rw-r--r--tests/modules/tselfimport.nim3
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")
-
James Booth <boothj5@gmail.com> 2016-08-10 20:45:14 +0100 committer James Booth <boothj5@gmail.com> 2016-08-10 20:45:14 +0100 Rename plugin jid arguments' href='/danisanti/profani-tty/commit/apidocs/python/src/plugin.py?id=a948d741d987b7c94487ec379484c7557c1ea98e'>a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^


a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^
a948d741 ^
c8d231fc ^
83385cdb ^
c8d231fc ^

a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^
a948d741 ^
c8d231fc ^

a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^


a948d741 ^
c8d231fc ^



a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^




a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^


a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^

83385cdb ^
c8d231fc ^

a308f5e4 ^


a948d741 ^
c8d231fc ^

a948d741 ^
c8d231fc ^

a948d741 ^
43b1d7f7 ^
c8d231fc ^

a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^






a308f5e4 ^



c8d231fc ^








a308f5e4 ^



c8d231fc ^












a308f5e4 ^



c8d231fc ^




a308f5e4 ^


a948d741 ^
c8d231fc ^
a308f5e4 ^
a948d741 ^

c8d231fc ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360