test/testlibrary/OutputAnalyzerTest.java

changeset 5706
9e11762cee52
parent 4885
3b890cd4da64
equal deleted inserted replaced
5705:335b388c4b28 5706:9e11762cee52
170 output.stderrShouldNotMatch(stderrPattern); 170 output.stderrShouldNotMatch(stderrPattern);
171 throw new Exception("shouldNotMatch() failed to throw exception"); 171 throw new Exception("shouldNotMatch() failed to throw exception");
172 } catch (RuntimeException e) { 172 } catch (RuntimeException e) {
173 // expected 173 // expected
174 } 174 }
175
176 {
177 String aaaa = "aaaa";
178 String result = output.firstMatch(aaaa);
179 if (!aaaa.equals(result)) {
180 throw new Exception("firstMatch(String) faild to match. Expected: " + aaaa + " got: " + result);
181 }
182 }
183
184 {
185 String aa = "aa";
186 String aa_grouped_aa = aa + "(" + aa + ")";
187 String result = output.firstMatch(aa_grouped_aa, 1);
188 if (!aa.equals(result)) {
189 throw new Exception("firstMatch(String, int) failed to match. Expected: " + aa + " got: " + result);
190 }
191 }
175 } 192 }
176 } 193 }

mercurial