code: update clients of readline since eol is stripped
authorJean Privat <jean@pryen.org>
Tue, 9 Dec 2014 09:15:56 +0000 (04:15 -0500)
committerJean Privat <jean@pryen.org>
Tue, 9 Dec 2014 09:17:17 +0000 (04:17 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>

contrib/nitiwiki/src/wiki_base.nit
lib/io/test_push_back_reader.nit
src/nitls.nit

index 2c0276b..d5db709 100644 (file)
@@ -116,7 +116,6 @@ class Nitiwiki
                while not pipe.eof do
                        var file = pipe.read_line
                        if file == "" then break # last line
-                       file = file.substring(0, file.length - 1) # strip last oef
                        var name = file.basename(".md")
                        if name == "header" or name == "footer" or name == "menu" then continue
                        files.add file
index 5bace8f..bf394aa 100644 (file)
@@ -99,16 +99,16 @@ efg
        fun test_read_line do
                var subject = sample
 
-               assert "abcd\n" == subject.read_line
-               assert "\n" == subject.read_line
+               assert "abcd" == subject.read_line
+               assert "" == subject.read_line
        end
 
        fun test_unread_read_line do
                var subject = sample
 
                subject.unread("a\nb")
-               assert "a\n" == subject.read_line
-               assert "babcd\n" == subject.read_line
+               assert "a" == subject.read_line
+               assert "babcd" == subject.read_line
        end
 
        fun test_eof do
index cde9656..e680223 100644 (file)
@@ -94,7 +94,6 @@ else
                        while not pipe.eof do
                                var l = pipe.read_line
                                if l == "" then break # last line
-                               l = l.substring(0,l.length-1) # strip last oef
                                files.add l
                        end
                        pipe.close