lots of small changes
This commit is contained in:
parent
c0c35839cc
commit
a5ecbf823f
85 changed files with 180 additions and 110 deletions
|
|
@ -120,7 +120,7 @@ proc match*(pattern: Pattern, s: string):
|
|||
if s.len != i:
|
||||
result.matched = false
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
let f = parsePattern("/show/@id/test/@show?/?")
|
||||
doAssert match(f, "/show/12/test/hallo/").matched
|
||||
doAssert match(f, "/show/2131726/test/jjjuuwąąss").matched
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ when not declared(normalizePath) and not declared(normalizedPath):
|
|||
result = path
|
||||
normalizePath(result)
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
var r = {:}.newStringTable
|
||||
parseUrlQuery("FirstName=Mickey", r)
|
||||
echo r
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ proc extractAll*(z: var ZipArchive, dest: string) =
|
|||
createDir(dest / file[0..file.rfind("/")])
|
||||
extractFile(z, file, dest / file)
|
||||
|
||||
when not defined(testing) and isMainModule:
|
||||
when not defined(testing) and true:
|
||||
var zip: ZipArchive
|
||||
if not zip.open("nim-0.11.0.zip"):
|
||||
raise newException(IOError, "opening zip failed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue