-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed tests, made Windows system branch
- Loading branch information
1 parent
403e5a7
commit 5d7ec6d
Showing
2 changed files
with
18 additions
and
5 deletions.
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
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 |
---|---|---|
@@ -1,14 +1,23 @@ | ||
import | ||
distros, | ||
unittest, | ||
assetfile, # will be generated by the 'nimble test' task | ||
assetfile_fast # will be generated by the 'nimble test' task | ||
|
||
suite "Nimassets Tests": | ||
test "Can Obtain Assets (normal)": | ||
check assetfile.getAsset("tests/testassets/asset1.txt") == readFile("tests/testassets/asset1.txt") | ||
check assetfile.getAsset("tests/testassets/asset2.txt") == readFile("tests/testassets/asset2.txt") | ||
if detectOs(Windows): | ||
check assetfile.getAsset("tests\\testassets\\asset1.txt") == readFile("tests\\testassets\\asset1.txt") | ||
check assetfile.getAsset("tests\\testassets\\asset2.txt") == readFile("tests\\testassets\\asset2.txt") | ||
else: | ||
check assetfile.getAsset("tests/testassets/asset1.txt") == readFile("tests/testassets/asset1.txt") | ||
check assetfile.getAsset("tests/testassets/asset2.txt") == readFile("tests/testassets/asset2.txt") | ||
|
||
test "Can Obtain Assets (fast)": | ||
check assetfile_fast.getAsset("tests/testassets/asset1.txt") == readFile("tests/testassets/asset1.txt") | ||
check assetfile_fast.getAsset("tests/testassets/asset2.txt") == readFile("tests/testassets/asset2.txt") | ||
if detectOs(Windows): | ||
check assetfile_fast.getAsset("tests\\testassets\\asset1.txt") == readFile("tests\\testassets\\asset1.txt") | ||
check assetfile_fast.getAsset("tests\\testassets\\asset2.txt") == readFile("tests\\testassets\\asset2.txt") | ||
else: | ||
check assetfile_fast.getAsset("tests/testassets/asset1.txt") == readFile("tests/testassets/asset1.txt") | ||
check assetfile_fast.getAsset("tests/testassets/asset2.txt") == readFile("tests/testassets/asset2.txt") | ||
|