Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Unified Diff: test/escape_test.dart

Issue 984463002: Improve the formatting of strings that contain unprintable ASCII characters. (Closed) Base URL: git@github.com:dart-lang/matcher@master
Patch Set: Code review changes Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/escape_test.dart
diff --git a/test/escape_test.dart b/test/escape_test.dart
index 035967c0a5f9f80bbddc0fdf0a5f97e9e29d3e74..db1a7a80e611f6ace122628cd686124688d0d05e 100644
--- a/test/escape_test.dart
+++ b/test/escape_test.dart
@@ -16,12 +16,17 @@ void main() {
_testEscaping('backspace', '\b', r'\b');
_testEscaping('tab', '\t', r'\t');
_testEscaping('vertical tab', '\v', r'\v');
+ _testEscaping('null byte', '\x00', r'\x00');
+ _testEscaping('ASCII control character', '\x11', r'\x11');
+ _testEscaping('delete', '\x7F', r'\x7F');
_testEscaping('escape combos', r'\n', r'\\n');
_testEscaping('All characters',
'A new line\nA charriage return\rA form feed\fA backspace\b'
- 'A tab\tA vertical tab\vA slash\\',
+ 'A tab\tA vertical tab\vA slash\\A null byte\x00A control char\x1D'
+ 'A delete\x7F',
r'A new line\nA charriage return\rA form feed\fA backspace\b'
- r'A tab\tA vertical tab\vA slash\\');
+ r'A tab\tA vertical tab\vA slash\\A null byte\x00A control char\x1D'
+ r'A delete\x7F');
});
group('unequal strings remain unequal when escaped', () {
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698