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

Unified Diff: test/string_matchers_test.dart

Issue 891463004: Correctly match and print strings with escaped values (Closed) Base URL: https://github.com/dart-lang/matcher.git@master
Patch Set: nits 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 | « test/pretty_print_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/string_matchers_test.dart
diff --git a/test/string_matchers_test.dart b/test/string_matchers_test.dart
index 7a7acbdbb92cb0e1dd942787634159483b2f0b38..4cebd588ae4525dfac5468d4adbe3c1a130830b3 100644
--- a/test/string_matchers_test.dart
+++ b/test/string_matchers_test.dart
@@ -12,6 +12,11 @@ import 'test_utils.dart';
void main() {
initUtils();
+ test('Reports mismatches in whitespace and escape sequences', () {
+ shouldFail('before\nafter', equals('before\\nafter'),
+ contains('Differ at offset 7'));
+ });
+
test('collapseWhitespace', () {
var source = '\t\r\n hello\t\r\n world\r\t \n';
expect(collapseWhitespace(source), 'hello world');
« no previous file with comments | « test/pretty_print_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698