summary refs log tree commit diff stats
path: root/tests/misc/treadln.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/treadln.nim')
-rw-r--r--tests/misc/treadln.nim13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/misc/treadln.nim b/tests/misc/treadln.nim
index 1edbea992..b716c4711 100644
--- a/tests/misc/treadln.nim
+++ b/tests/misc/treadln.nim
@@ -1,3 +1,11 @@
+
+discard """
+output: '''
+test the improved readline handling that does not care whether its
+Macintosh, Unix or Windows text format.
+'''
+"""
+
 # test the improved readline handling that does not care whether its
 # Macintosh, Unix or Windows text format.
 
@@ -5,8 +13,9 @@ var
   inp: File
   line: string
 
-if open(inp, "readme.txt"):
+if open(inp, "tests/misc/treadln.nim"):
   while not endOfFile(inp):
     line = readLine(inp)
-    echo("#" & line & "#")
+    if line.len >= 2 and line[0] == '#' and line[1] == ' ':
+      echo line[2..^1]
   close(inp)