01: /*
02: * Copyright 2001 Sun Microsystems, Inc. All rights reserved.
03: * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to license terms.
04: */
05:
06: package com.sun.portal.search.util;
07:
08: import java.util.*;
09: import java.io.*;
10:
11: /**
12: * PBlock config file handling
13: */
14: public class TestPBlock {
15:
16: public static void main(String[] args) throws Exception {
17: String[] tests = {
18: "a",
19: "a=",
20: "a=\n",
21: "a=b",
22: "",
23: " \n \t ",
24: "\"",
25: "a\t=b\n",
26: "aa=bb",
27: "=bb ",
28: "\"=\"",
29: "\\=",
30: " a b= c=\\\\ d=\\\" e=\" \\\"\\a\" blah x=\\\"\\\"\\\" \\\" \" zz=\\\\\" bb\"", };
31:
32: for (int i = 0; i < tests.length; ++i) {
33: HashMap map = new HashMap();
34: PBlock.str2pblock(tests[i], map);
35: System.out.println(tests[i] + " => " + map);
36: }
37: }
38:
39: }
|