forked from JoeStrout/miniscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
110c8e5
commit 58ff9c1
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,6 @@ Debug | |
miniscript-cpp.dir | ||
*.vcxproj* | ||
*.sln | ||
|
||
# Tests fallout | ||
_*.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import "qa" | ||
|
||
testDir = "tests/" | ||
|
||
testFileReadLines = function | ||
fn = file.child(testDir, "_cr.txt") | ||
f = file.open(fn, "w") | ||
f.write("a" + char(13) + "b" + char(13) + "c") | ||
f.close | ||
qa.assertEqual file.readLines("tests/_cr.txt"), ["a", "b", "c"] | ||
|
||
fn = file.child(testDir, "_lf.txt") | ||
f = file.open(fn, "w") | ||
f.write("a" + char(10) + "b" + char(10) + "c") | ||
f.close | ||
qa.assertEqual file.readLines("tests/_lf.txt"), ["a", "b", "c"] | ||
|
||
fn = file.child(testDir, "_crlf.txt") | ||
f = file.open(fn, "w") | ||
f.write("a" + char(13) + char(10) + "b" + char(13) + char(10) + "c") | ||
f.close | ||
qa.assertEqual file.readLines("tests/_crlf.txt"), ["a", "b", "c"] | ||
end function | ||
|
||
if refEquals(locals, globals) then testFileReadLines |