Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #4671 implemented get_safe_url()
- Loading branch information
Showing
20 changed files
with
202 additions
and
29 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
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
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
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,25 @@ | ||
#!/usr/bin/env qore | ||
# -*- mode: qore; indent-tabs-mode: nil -*- | ||
|
||
%new-style | ||
%enable-all-warnings | ||
%require-types | ||
%strict-args | ||
|
||
%requires ../../../../qlib/QUnit.qm | ||
|
||
%exec-class GetQoreOptionListTest | ||
|
||
public class GetQoreOptionListTest inherits QUnit::Test { | ||
constructor() : Test("GetQoreOptionListTest", "1.0") { | ||
addTestCase("get_qore_option_list() test", \getQoreOptionListTest()); | ||
|
||
# Return for compatibility with test harness that checks return value. | ||
set_return_value(main()); | ||
} | ||
|
||
getQoreOptionListTest() { | ||
list<auto> l = get_qore_option_list(); | ||
assertEq("list<hash<auto>>", l.fullType()); | ||
} | ||
} |
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,29 @@ | ||
#!/usr/bin/env qore | ||
# -*- mode: qore; indent-tabs-mode: nil -*- | ||
|
||
%new-style | ||
%enable-all-warnings | ||
%require-types | ||
%strict-args | ||
|
||
%requires ../../../../qlib/QUnit.qm | ||
|
||
%exec-class getSafeUrlTest | ||
|
||
public class getSafeUrlTest inherits QUnit::Test { | ||
constructor() : Test("get_safe_url test", "1.0") { | ||
addTestCase("main test", \mainTest()); | ||
|
||
# Return for compatibility with test harnesses that check the return value | ||
set_return_value(main()); | ||
} | ||
|
||
mainTest() { | ||
assertEq("https://user:<masked>@site:8001/path", get_safe_url("https://user:password@site:8001/path")); | ||
assertEq("https://user:<masked>@site:8001", get_safe_url("https://user:password@site:8001")); | ||
|
||
assertEq("user:<masked>@site:8001/path", get_safe_url("user:password@site:8001/path")); | ||
assertEq("user:<masked>@:8001/path", get_safe_url("user:pass@:8001/path")); | ||
assertEq(":<masked>@:8001/path", get_safe_url(":pass@:8001/path")); | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.