Author: lslezak Date: Wed Apr 29 12:24:13 2009 New Revision: 57027
URL: http://svn.opensuse.org/viewcvs/yast?rev=57027&view=rev Log: - added URLRecode testsuite
Added: trunk/yast2/library/types/testsuite/tests/URLRecode.err trunk/yast2/library/types/testsuite/tests/URLRecode.out trunk/yast2/library/types/testsuite/tests/URLRecode.ycp (with props)
Added: trunk/yast2/library/types/testsuite/tests/URLRecode.err URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/testsuite/tes... ============================================================================== (empty)
Added: trunk/yast2/library/types/testsuite/tests/URLRecode.out URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/testsuite/tes... ============================================================================== --- trunk/yast2/library/types/testsuite/tests/URLRecode.out (added) +++ trunk/yast2/library/types/testsuite/tests/URLRecode.out Wed Apr 29 12:24:13 2009 @@ -0,0 +1,7 @@ +Return nil +Return +Return /%40%23%24%25%5e%26/dir/%c4%8d%c3%bd%c4%9b%c5%a1%c4%8d%c3%bd%c3%a1/file +Return true +Return %20!%40%23%24%25%5e%26*()/%3f%2b%3d +Return %20!%40%23%24%25^%26*()%2f%3f%2b%3d +Return %20!%40%23%24%25^&*()/%3f%2b=
Added: trunk/yast2/library/types/testsuite/tests/URLRecode.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/testsuite/tes... ============================================================================== --- trunk/yast2/library/types/testsuite/tests/URLRecode.ycp (added) +++ trunk/yast2/library/types/testsuite/tests/URLRecode.ycp Wed Apr 29 12:24:13 2009 @@ -0,0 +1,27 @@ +/** + * Testsuite for URLRecode.pm module + * + * $Id$ + */ + +{ + +include "testsuite.ycp"; +import "URLRecode"; + + +TEST(``(URLRecode::EscapePath(nil)), [], nil); +TEST(``(URLRecode::EscapePath("")), [], nil); + +string test_path = "/@#$%^&/dir/ÄýÄÅ¡Äýá/file"; + +TEST(``(URLRecode::EscapePath(test_path)), [], nil); +TEST(``(URLRecode::UnEscape(URLRecode::EscapePath(test_path)) == test_path), [], nil); + + +TEST(``(URLRecode::EscapePath(" !@#$%^&*()/?+=")), [], nil); +TEST(``(URLRecode::EscapePassword(" !@#$%^&*()/?+=")), [], nil); +TEST(``(URLRecode::EscapeQuery(" !@#$%^&*()/?+=")), [], nil); + +/* EOF */ +}
yast-commit@lists.opensuse.org