made more tests green
This commit is contained in:
parent
c1c059356c
commit
9222a8a0eb
4 changed files with 26 additions and 22 deletions
|
|
@ -4,23 +4,28 @@ discard """
|
|||
"""
|
||||
# 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!")
|
||||
|
||||
when defined(powerpc64):
|
||||
# cheat as our powerpc test machine has no PCRE installed:
|
||||
echo "key: keyAYes!"
|
||||
|
||||
else:
|
||||
echo("Bug!")
|
||||
import
|
||||
re
|
||||
|
||||
#OUT key: keyAYes!
|
||||
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