Skip to content

Commit

Permalink
LDEV-4743 inprove test
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Dec 15, 2023
1 parent 8ec0816 commit 002e7b6
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions tests/LDEV4743.cfc
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" skip=true {
component extends="org.lucee.cfml.test.LuceeTestCase" labels="esapi" {
function run( testResults , testBox ) {
describe( title='Testcase for LDEV-4743' , body=function() {
it( title='Checking canonicalize() function with % symbol' , body=function() {
expect( canonicalize("Lucee", false, false) ).toBe( "Lucee" );
expect( canonicalize("!@##$^&*()_+{}[]:"";''<>, .?/|\~`.", false, false) ).toBe( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`." );
expect( function() {
var str = '(80 - 100%).pdf'; // Only failed with the '%' symbol
canonicalize(str, false, false);
}).notToThrow();

it( title='Checking simple canonicalize()', body=function() {
expect( canonicalize( "Lucee", false, false ) ).toBe( "Lucee" );
});

it( title='Checking canonicalize() function with complex string', body=function() {
expect( canonicalize( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`.", false, false ) ).toBe( "!@##$^&*()_+{}[]:"";''<>, .?/|\~`." );
});

it( title='Checking canonicalize() function with % symbol', skip=true, body=function() {
var str = '(80 - 100%).pdf'; // Only failed with the '%' symbol
expect( canonicalize( str, false, false ) ).toBe( str );
});
});
}
Expand Down

0 comments on commit 002e7b6

Please sign in to comment.