got rid of 'accept' dir in the tests
This commit is contained in:
parent
d0772feb08
commit
a274f3bf5b
264 changed files with 5 additions and 7 deletions
26
tests/run/tregex.nim
Executable file
26
tests/run/tregex.nim
Executable file
|
|
@ -0,0 +1,26 @@
|
|||
discard """
|
||||
file: "tregex.nim"
|
||||
output: "key: keyAYes!"
|
||||
"""
|
||||
# Test the new regular expression module
|
||||
# which is based on the PCRE library
|
||||
|
||||
import
|
||||
re
|
||||
|
||||
if "keyA = valueA" =~ re"\s*(\w+)\s*\=\s*(\w+)":
|
||||
write(stdout, "key: ", matches[0])
|
||||
elif "# comment!" =~ re.re"\s*(\#.*)":
|
||||
# test re.re"" syntax
|
||||
echo("comment: ", matches[0])
|
||||
else:
|
||||
echo("Bug!")
|
||||
|
||||
if "Username".match(re"[A-Za-z]+"):
|
||||
echo("Yes!")
|
||||
else:
|
||||
echo("Bug!")
|
||||
|
||||
#OUT key: keyAYes!
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue