lots of small changes

This commit is contained in:
Arne Döring 2018-12-05 19:03:01 +01:00 • committed by Araq
commit a5ecbf823f
85 changed files with 180 additions and 110 deletions

View file

@ -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

View file

@ -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

View file

@ -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")