OLD | NEW |
1 library parser_test; | 1 library parser_test; |
2 | 2 |
3 import 'dart:convert'; | 3 import 'dart:convert'; |
4 import 'dart:io'; | 4 import 'dart:io'; |
5 import 'package:path/path.dart' as pathos; | 5 import 'package:path/path.dart' as pathos; |
6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
7 import 'package:html5lib/dom.dart'; | 7 import 'package:html5lib/dom.dart'; |
8 import 'package:html5lib/parser.dart'; | 8 import 'package:html5lib/parser.dart'; |
9 import 'package:html5lib/parser_console.dart' as parser_console; | 9 import 'package:html5lib/parser_console.dart' as parser_console; |
10 import 'package:html5lib/src/inputstream.dart' as inputstream; | 10 import 'package:html5lib/src/inputstream.dart' as inputstream; |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 }); | 102 }); |
103 } | 103 } |
104 } | 104 } |
105 | 105 |
106 index++; | 106 index++; |
107 } | 107 } |
108 }); | 108 }); |
109 } | 109 } |
110 } | 110 } |
111 | 111 |
112 /** Extract the name for the test based on the test input data. */ | 112 /// Extract the name for the test based on the test input data. |
113 _nameFor(String input) { | 113 _nameFor(String input) { |
114 // Using JSON.decode to unescape other unicode characters | 114 // Using JSON.decode to unescape other unicode characters |
115 var escapeQuote = input | 115 var escapeQuote = input |
116 .replaceAll(new RegExp('\\\\.'), '_') | 116 .replaceAll(new RegExp('\\\\.'), '_') |
117 .replaceAll(new RegExp('\u0000'), '_') | 117 .replaceAll(new RegExp('\u0000'), '_') |
118 .replaceAll('"', '\\"') | 118 .replaceAll('"', '\\"') |
119 .replaceAll(new RegExp('[\n\r\t]'),'_'); | 119 .replaceAll(new RegExp('[\n\r\t]'),'_'); |
120 return JSON.decode('"$escapeQuote"'); | 120 return JSON.decode('"$escapeQuote"'); |
121 } | 121 } |
OLD | NEW |