diff --git a/src/main/cpp/tests/parse_uri.cpp b/src/main/cpp/tests/parse_uri.cpp index 0dc5f68522..e3d25d44cf 100644 --- a/src/main/cpp/tests/parse_uri.cpp +++ b/src/main/cpp/tests/parse_uri.cpp @@ -86,7 +86,12 @@ TEST_F(ParseURIProtocolTests, SparkEdges) "www.nvidia.com:8100/servlet/" "impc.DisplayCredits?primekey_in=2000041100:05:14115240636", "https://nvidia.com/2Ru15Ss ", - "http://www.nvidia.com/plugins//##"}); + "http://www.nvidia.com/plugins//##", + "www.nvidia.com:81/Free.fr/L7D9qw9X4S-aC0&D4X0/Panels&solutionId=0X54a/" + "cCdyncharset=UTF-8&t=01wx58Tab&ps=solution/" + "ccmd=_help&locale0X1&countrycode=MA/", + "http://www.nvidia.com/tags.php?%2F88\323\351\300ึณวน\331\315\370%2F", + "http://www.nvidia.com//wp-admin/includes/index.html#9389#123"}); auto result = spark_rapids_jni::parse_uri_to_protocol(cudf::strings_column_view{col}); @@ -118,8 +123,11 @@ TEST_F(ParseURIProtocolTests, SparkEdges) "", "www.nvidia.com", "", + "", + "www.nvidia.com", + "", ""}, - {1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0}); + {1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0}); printf("expected:\n"); cudf::test::print(expected); diff --git a/src/test/java/com/nvidia/spark/rapids/jni/ParseURITest.java b/src/test/java/com/nvidia/spark/rapids/jni/ParseURITest.java index 8bf7176def..ddd12e1c6f 100644 --- a/src/test/java/com/nvidia/spark/rapids/jni/ParseURITest.java +++ b/src/test/java/com/nvidia/spark/rapids/jni/ParseURITest.java @@ -49,7 +49,7 @@ void buildExpectedAndRun(String[] testData) { @Test void parseURIToProtocolSparkTest() { String[] testData = { - /*"https://nvidia.com/https&#://nvidia.com", + "https://nvidia.com/https&#://nvidia.com", "https://http://www.nvidia.com", "filesystemmagicthing://bob.yaml", "nvidia.com:8080", @@ -69,9 +69,9 @@ void parseURIToProtocolSparkTest() { "https://www.nvidia.com:8080/q", "https://www.nvidia.com#8080", "file://path/to/cool/file", - "http//www.nvidia.com/q",*/ + "http//www.nvidia.com/q", "http://?", - "http://#",/* + "http://#", "http://??", "http://??/", "http://user:pass@host/file;param?query;p2", @@ -80,8 +80,11 @@ void parseURIToProtocolSparkTest() { "https://nvidia.com/2Ru15Ss ", "http://www.nvidia.com/xmlrpc//##", "www.nvidia.com:8080/expert/sciPublication.jsp?ExpertId=1746&lenList=all", - "www.nvidia.com:8080/hrcxtf/view?docId=ead/00073.xml&query=T.%20E.%20Lawrence&query-join=and",*/ - "", + "www.nvidia.com:8080/hrcxtf/view?docId=ead/00073.xml&query=T.%20E.%20Lawrence&query-join=and", + "www.nvidia.com:81/Free.fr/L7D9qw9X4S-aC0&D4X0/Panels&solutionId=0X54a/cCdyncharset=UTF-8&t=01wx58Tab&ps=solution/ccmd=_help&locale0X1&countrycode=MA/", + "http://www.nvidia.com/tags.php?%2F88\323\351\300ึณวน\331\315\370%2F", + "http://www.nvidia.com//wp-admin/includes/index.html#9389#123", + "", null}; buildExpectedAndRun(testData);