1 /**
2 * Logback: the reliable, generic, fast and flexible logging framework.
3 * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
4 *
5 * This program and the accompanying materials are dual-licensed under
6 * either the terms of the Eclipse Public License v1.0 as published by
7 * the Eclipse Foundation
8 *
9 * or (per the licensee's choosing)
10 *
11 * under the terms of the GNU Lesser General Public License version 2.1
12 * as published by the Free Software Foundation.
13 */
14 package ch.qos.logback.core.pattern.parser;
15
16 import org.junit.jupiter.api.Test;
17
18 public class OptionTokenizerTest {
19
20 @Test
21 public void testEmpty() {
22
23 }
24
25 //
26 // @Test
27 // public void testEmpty() throws ScanException {
28 // {
29 // List ol = new OptionTokenizer("").tokenize();
30 // List witness = new ArrayList();
31 // assertEquals(witness, ol);
32 // }
33 //
34 // {
35 // List ol = new OptionTokenizer(" ").tokenize();
36 // List witness = new ArrayList();
37 // assertEquals(witness, ol);
38 // }
39 // }
40 //
41 // @Test
42 // public void testSimple() throws ScanException {
43 // {
44 // List ol = new OptionTokenizer("abc").tokenize();
45 // List<String> witness = new ArrayList<String>();
46 // witness.add("abc");
47 // assertEquals(witness, ol);
48 // }
49 // }
50 //
51 // @Test
52 // public void testSingleQuote() throws ScanException {
53 // {
54 // List ol = new OptionTokenizer("' '").tokenize();
55 // List<String> witness = new ArrayList<String>();
56 // witness.add(" ");
57 // assertEquals(witness, ol);
58 // }
59 //
60 // {
61 // List ol = new OptionTokenizer("' x\t'").tokenize();
62 // List<String> witness = new ArrayList<String>();
63 // witness.add(" x\t");
64 // assertEquals(witness, ol);
65 // }
66 //
67 // {
68 // List ol = new OptionTokenizer("' x\\t'").tokenize();
69 // List<String> witness = new ArrayList<String>();
70 // witness.add(" x\\t");
71 // assertEquals(witness, ol);
72 // }
73 //
74 // {
75 // List ol = new OptionTokenizer("' x\\''").tokenize();
76 // List<String> witness = new ArrayList<String>();
77 // witness.add(" x\\'");
78 // assertEquals(witness, ol);
79 // }
80 // }
81 //
82 //
83 //
84 // @Test
85 // public void testDoubleQuote() throws ScanException {
86 // {
87 // List ol = new OptionTokenizer("\" \"").tokenize();
88 // List<String> witness = new ArrayList<String>();
89 // witness.add(" ");
90 // assertEquals(witness, ol);
91 // }
92 //
93 // {
94 // List ol = new OptionTokenizer("\" x\t\"").tokenize();
95 // List<String> witness = new ArrayList<String>();
96 // witness.add(" x\t");
97 // assertEquals(witness, ol);
98 // }
99 //
100 // {
101 // List ol = new OptionTokenizer("\" x\\t\"").tokenize();
102 // List<String> witness = new ArrayList<String>();
103 // witness.add(" x\\t");
104 // assertEquals(witness, ol);
105 // }
106 //
107 // {
108 // List ol = new OptionTokenizer("\" x\\\"\"").tokenize();
109 // List<String> witness = new ArrayList<String>();
110 // witness.add(" x\\\"");
111 // assertEquals(witness, ol);
112 // }
113 // }
114 //
115 // @Test
116 // public void testMultiple() throws ScanException {
117 // {
118 // List ol = new OptionTokenizer("a, b").tokenize();
119 // List<String> witness = new ArrayList<String>();
120 // witness.add("a");
121 // witness.add("b");
122 // assertEquals(witness, ol);
123 // }
124 // {
125 // List ol = new OptionTokenizer("'a', b").tokenize();
126 // List<String> witness = new ArrayList<String>();
127 // witness.add("a");
128 // witness.add("b");
129 // assertEquals(witness, ol);
130 // }
131 // {
132 // List ol = new OptionTokenizer("'', b").tokenize();
133 // List<String> witness = new ArrayList<String>();
134 // witness.add("");
135 // witness.add("b");
136 // assertEquals(witness, ol);
137 // }
138 // }
139 //
140 }