Mercurial > games > semicongine
annotate tests/test_resources.nim @ 374:ad2a7586f625
did: update flags to reflect new defaults in nim v2
author | Sam <sam@basx.dev> |
---|---|
date | Sun, 26 Nov 2023 16:20:24 +0700 |
parents | 5f6d3511ef79 |
children | 1ab09f8cc68d |
rev | line source |
---|---|
235
5f6d3511ef79
did: replace zippy with "standard" nim zip, compiled from source, fix some errors
Sam <sam@basx.dev>
parents:
213
diff
changeset
|
1 import std/streams |
207
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
2 |
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
3 import semicongine |
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
4 |
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
5 proc main() = |
213
b5d9410a8184
add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents:
207
diff
changeset
|
6 echo "Mods available: ", modList() |
b5d9410a8184
add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents:
207
diff
changeset
|
7 for modName in modList(): |
b5d9410a8184
add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents:
207
diff
changeset
|
8 echo modName, ":" |
b5d9410a8184
add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents:
207
diff
changeset
|
9 selectedMod = modName |
b5d9410a8184
add: resource packaging and loading for different resource types, simplify build commands, update readme
Sam <sam@basx.dev>
parents:
207
diff
changeset
|
10 for i in walkResources(): |
235
5f6d3511ef79
did: replace zippy with "standard" nim zip, compiled from source, fix some errors
Sam <sam@basx.dev>
parents:
213
diff
changeset
|
11 echo " ", i, ": ", loadResource(i).readAll().len |
207
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
12 |
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
13 when isMainModule: |
81fab407a479
add: some adjustment to the last refactoring :P
Sam <sam@basx.dev>
parents:
diff
changeset
|
14 main() |