-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
KIRSTEN W. HILDRUM
committed
Oct 4, 2015
1 parent
1988a97
commit ed3e8a4
Showing
2 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/tests.http/com.ibm.streamsx.inet.http.tests/URLEncode.spl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
namespace com.ibm.streamsx.inet.http.tests; | ||
use com.ibm.streamsx.inet.http::urlEncode; | ||
use com.ibm.streamsx.inet.http::urlDecode; | ||
|
||
composite URLEncodeTestMain { | ||
|
||
graph | ||
() as tester = Custom() { | ||
|
||
logic onProcess: { | ||
|
||
rstring raw = "This has spaces and newline \n."; | ||
//println(raw); | ||
rstring encoded = urlEncode(raw); | ||
//println(encoded); | ||
rstring decoded = urlDecode(encoded); | ||
if (decoded != raw) { | ||
abort(); | ||
} | ||
rstring raw2 = "This has a null \0 now stuff after the null"; | ||
//println(raw2); | ||
rstring encoded2 = urlEncode(raw2); | ||
//println(encoded2); | ||
rstring decoded2 = urlDecode(encoded2); | ||
if (raw2 != decoded2) { | ||
abort(); | ||
} | ||
|
||
} | ||
|
||
} | ||
|
||
} |