Skip to content

Commit

Permalink
minor tweaks for readability to validate_regex unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HariSekhon committed Aug 30, 2017
1 parent 305a9b2 commit 6b0b6f7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions t/HariSekhonUtils.t
Original file line number Diff line number Diff line change
Expand Up @@ -845,12 +845,12 @@ is(isRegex("(.*"), undef, 'isRegex("(.*") eq undef');
like(validate_regex("some[Rr]egex.*(capture)"), qr/\(\?(?:\^|-xism):some\[Rr\]egex\.\*\(capture\)\)/, 'validate_regex("some[Rr]egex.*(capture)")');
# Errors out still, should detect and fail gracefully
#is(validate_regex("some[Rr]egex.*(capture broken", 1), undef, 'validate_regex("some[Rr]egex.*(capture broken", 1)');
is(validate_regex("somePosix[Rr]egex.*(capture)", undef, 0, "posix"), "somePosix[Rr]egex.*(capture)", 'validate_regex("somePosix[Rr]egex.*(capture)", undef, 0, 1)');
is(validate_regex("somePosix[Rr]egex.*(capture broken", undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*(capture broken", undef, 1, 1) eq undef');
is(validate_regex('somePosix[Rr]egex.*$(evilcmd)', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*$(evilcmd)", undef, 1, 1) eq undef');
is(validate_regex('somePosix[Rr]egex.*$(evilcmd', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*$(evilcmd", undef, 1, 1) eq undef');
is(validate_regex('somePosix[Rr]egex.*`evilcmd`', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*`evilcmd`", undef, 1, 1) eq undef');
is(validate_regex('somePosix[Rr]egex.*`evilcmd', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*`evilcmd", undef, 1, 1) eq undef');
is(validate_regex("somePosix[Rr]egex.*(capture)", undef, 0, "posix"), "somePosix[Rr]egex.*(capture)", 'validate_regex("somePosix[Rr]egex.*(capture)", undef, 0, posix)');
is(validate_regex("somePosix[Rr]egex.*(capture broken", undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*(capture broken", undef, noquit, posix) eq undef');
is(validate_regex('somePosix[Rr]egex.*$(evilcmd)', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*$(evilcmd)", undef, noquit, posix) eq undef');
is(validate_regex('somePosix[Rr]egex.*$(evilcmd', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*$(evilcmd", undef, noquit, posix) eq undef');
is(validate_regex('somePosix[Rr]egex.*`evilcmd`', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*`evilcmd`", undef, noquit, posix) eq undef');
is(validate_regex('somePosix[Rr]egex.*`evilcmd', undef, "noquit", "posix"), undef, 'validate_regex("somePosix[Rr]egex.*`evilcmd", undef, noquit, posix) eq undef');

# ============================================================================ #
ok(!isScalar(1), '!isScalar(1)');
Expand Down

0 comments on commit 6b0b6f7

Please sign in to comment.