Skip to content

Commit

Permalink
Item13294: Item13301: Unit test failures
Browse files Browse the repository at this point in the history
String and quoting changes broke these tests.
  • Loading branch information
gac410 committed Mar 10, 2015
1 parent 8cbf360 commit 603cb4c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions UnitTestContrib/test/unit/Fn_ENCODE.pm
Expand Up @@ -25,7 +25,7 @@ sub test_default {
# test default parameter
$str =
$this->{test_topicObject}->expandMacros('%ENCODE{"<evil script>\'\"%"}%');
$this->assert_str_equals( '%3cevil%20script%3e\'%22%25', "$str" );
$this->assert_str_equals( '%3cevil%20script%3e%27%22%25', "$str" );
}

sub test_encode {
Expand Down Expand Up @@ -69,7 +69,7 @@ sub test_encode {
$str =
$this->{test_topicObject}
->expandMacros("%ENCODE{\"<evil script>\n&\'\\\"%*A\" type=\"url\"}%");
$this->assert_str_equals( "%3cevil%20script%3e%0a%26\'%22%25*A", "$str" );
$this->assert_str_equals( "%3cevil%20script%3e%0a%26%27%22%25*A", "$str" );

#http://trunk.foswiki.org/Tasks/Item5453
#unfortuanatly, perl considers the string '0' to be
Expand Down
2 changes: 1 addition & 1 deletion UnitTestContrib/test/unit/Fn_QUERYPARAMS.pm
Expand Up @@ -107,7 +107,7 @@ sub test_encode {
$str =
$this->{test_topicObject}->expandMacros('%QUERYPARAMS{encoding="url"}%');
$this->assert_str_equals(
"foo=%3cevil%20script%3e%0a%26'%22%25*A\nfee=free", "$str" );
"foo=%3cevil%20script%3e%0a%26%27%22%25*A\nfee=free", "$str" );
}

sub test_format {
Expand Down
2 changes: 1 addition & 1 deletion UnitTestContrib/test/unit/Fn_URLPARAM.pm
Expand Up @@ -185,7 +185,7 @@ sub test_multiple {
'%URLPARAM{"multi" multiple="-$item$quot-" encode="url" separator=","}%'
);
$this->assert_str_equals(
"-f!%22%a3%24%0a%7b%7d%5b%5do%22-,-b%25%5e%26*:%40%3b'r%22-,-b%28%29_%2b-%3d%3c%3e%3f%2c./%7cz%22-",
"-f!%22%a3%24%0a%7b%7d%5b%5do%22-,-b%25%5e%26*:%40%3b%27r%22-,-b%28%29_%2b-%3d%3c%3e%3f%2c./%7cz%22-",
"$str"
);
}
Expand Down
2 changes: 1 addition & 1 deletion UnitTestContrib/test/unit/ManageDotPmTests.pm
Expand Up @@ -919,7 +919,7 @@ qr/You cannot register twice, the name 'tbu3' is already registered\./,
else {
push @expected, qw(TestBulkUser2 TestBulkUser4);
$this->assert_matches(
qr/The System.LoginName \(tbu3\) is not allowed for this installation/,
qr/The \[\[System.LoginName\]\[Login Name\]\] \(tbu3\) is not allowed for this installation/,
$topicText
);
$this->assert_matches(
Expand Down

0 comments on commit 603cb4c

Please sign in to comment.