| OLD | NEW |
| 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
| 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 4 * | 4 * |
| 5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
| 6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
| 7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
| 8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
| 9 * | 9 * |
| 10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 expectedmatch = Array('xb'); | 188 expectedmatch = Array('xb'); |
| 189 addThis(); | 189 addThis(); |
| 190 | 190 |
| 191 status = inSection(21); | 191 status = inSection(21); |
| 192 pattern = /a|[^b]{1}b/; | 192 pattern = /a|[^b]{1}b/; |
| 193 actualmatch = string.match(pattern); | 193 actualmatch = string.match(pattern); |
| 194 expectedmatch = Array('xb'); | 194 expectedmatch = Array('xb'); |
| 195 addThis(); | 195 addThis(); |
| 196 | 196 |
| 197 | 197 |
| 198 string = 'hallo\";' | 198 string = 'hallo\";'; |
| 199 status = inSection(22); | 199 status = inSection(22); |
| 200 pattern = /^((\\[^\x00-\x1f]|[^\x00-\x1f"\\])*)"/; | 200 pattern = /^((\\[^\x00-\x1f]|[^\x00-\x1f"\\])*)"/; |
| 201 » » » actualmatch = string.match(pattern); | 201 actualmatch = string.match(pattern); |
| 202 » » » expectedmatch = Array('hallo"', 'hallo', 'o'); | 202 expectedmatch = Array('hallo"', 'hallo', 'o'); |
| 203 » » » addThis(); | 203 addThis(); |
| 204 | 204 |
| 205 //---------------------------------------------------------------------------- |
| 206 test(); |
| 207 //---------------------------------------------------------------------------- |
| 205 | 208 |
| 209 function addThis() |
| 210 { |
| 211 statusmessages[i] = status; |
| 212 patterns[i] = pattern; |
| 213 strings[i] = string; |
| 214 actualmatches[i] = actualmatch; |
| 215 expectedmatches[i] = expectedmatch; |
| 216 i++; |
| 217 } |
| 206 | 218 |
| 207 | 219 function test() |
| 208 //------------------------------------------------------------------------------
------------------- | |
| 209 » » » test(); | |
| 210 //------------------------------------------------------------------------------
------------------- | |
| 211 | |
| 212 | |
| 213 | |
| 214 » » » function addThis() | |
| 215 » » » { | |
| 216 » » » » statusmessages[i] = status; | |
| 217 » » » » patterns[i] = pattern; | |
| 218 » » » » strings[i] = string; | |
| 219 » » » » actualmatches[i] = actualmatch; | |
| 220 » » » » expectedmatches[i] = expectedmatch; | |
| 221 » » » » i++; | |
| 222 » » » } | |
| 223 | |
| 224 | |
| 225 » » » function test() | |
| 226 { | 220 { |
| 227 enterFunc ('test'); | 221 enterFunc ('test'); |
| 228 printBugNumber(BUGNUMBER); | 222 printBugNumber(BUGNUMBER); |
| 229 printStatus (summary); | 223 printStatus (summary); |
| 230 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches); | 224 testRegExp(statusmessages, patterns, strings, actualmatches, expectedmatches); |
| 231 exitFunc ('test'); | 225 exitFunc ('test'); |
| 232 } | 226 } |
| OLD | NEW |