7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 @bug 4922813
26 @summary Check the new impl of encodePath will not cause regression
27 */
28
29 import java.util.BitSet;
30 import java.io.File;
31 import java.util.Random;
32 import sun.net.www.ParseUtil;
33
34 public class ParseUtil_4922813 {
35 public static void main(String[] argv) throws Exception {
36
37 int num = 400;
38 while (num-- >= 0) {
39 String source = getTestSource();
40 String ec = sun.net.www.ParseUtil.encodePath(source);
41 String v117 = ParseUtil_V117.encodePath(source);
42 if (!ec.equals(v117)) {
43 throw new RuntimeException("Test Failed for : \n"
44 + " source =<"
45 + getUnicodeString(source)
46 + ">");
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /* @test
25 @bug 4922813
26 @summary Check the new impl of encodePath will not cause regression
27 @key randomness
28 */
29
30 import java.util.BitSet;
31 import java.io.File;
32 import java.util.Random;
33 import sun.net.www.ParseUtil;
34
35 public class ParseUtil_4922813 {
36 public static void main(String[] argv) throws Exception {
37
38 int num = 400;
39 while (num-- >= 0) {
40 String source = getTestSource();
41 String ec = sun.net.www.ParseUtil.encodePath(source);
42 String v117 = ParseUtil_V117.encodePath(source);
43 if (!ec.equals(v117)) {
44 throw new RuntimeException("Test Failed for : \n"
45 + " source =<"
46 + getUnicodeString(source)
47 + ">");
|