diff options
Diffstat (limited to 'tests/run/tregex.nim')
-rwxr-xr-x | tests/run/tregex.nim | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/tests/run/tregex.nim b/tests/run/tregex.nim deleted file mode 100755 index 7ac628c4d..000000000 --- a/tests/run/tregex.nim +++ /dev/null @@ -1,26 +0,0 @@ -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! - - |