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.nim11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/misc/treadln.nim b/tests/misc/treadln.nim
index 6e01097aa..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.
 
@@ -8,5 +16,6 @@ var
 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)