start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
19
tests/accept/run/tregex.nim
Normal file
19
tests/accept/run/tregex.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Test the new regular expression module
|
||||
# which is based on the PCRE library
|
||||
|
||||
import
|
||||
regexprs
|
||||
|
||||
if "keyA = valueA" =~ r"\s*(\w+)\s*\=\s*(\w+)":
|
||||
write(stdout, "key: ", matches[1])
|
||||
elif "# comment!" =~ r"\s*(\#.*)":
|
||||
echo("comment: ", matches[1])
|
||||
else:
|
||||
echo("Bug!")
|
||||
|
||||
if "Username".match("[A-Za-z]+"):
|
||||
echo("Yes!")
|
||||
else:
|
||||
echo("Bug!")
|
||||
|
||||
#OUT key: keyAYes!
|
||||
Loading…
Add table
Add a link
Reference in a new issue