| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library matcher.escape_test; | |
| 6 | |
| 7 import 'package:matcher/src/util.dart'; | 5 import 'package:matcher/src/util.dart'; |
| 8 import 'package:test/test.dart'; | 6 import 'package:test/test.dart'; |
| 9 | 7 |
| 10 void main() { | 8 void main() { |
| 11 group('escaping should work with', () { | 9 group('escaping should work with', () { |
| 12 _testEscaping('no escaped chars', 'Hello, world!', 'Hello, world!'); | 10 _testEscaping('no escaped chars', 'Hello, world!', 'Hello, world!'); |
| 13 _testEscaping('newline', '\n', r'\n'); | 11 _testEscaping('newline', '\n', r'\n'); |
| 14 _testEscaping('carriage return', '\r', r'\r'); | 12 _testEscaping('carriage return', '\r', r'\r'); |
| 15 _testEscaping('form feed', '\f', r'\f'); | 13 _testEscaping('form feed', '\f', r'\f'); |
| 16 _testEscaping('backspace', '\b', r'\b'); | 14 _testEscaping('backspace', '\b', r'\b'); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 expect(s1 != s2, isTrue, reason: 'The source values should be unequal'); | 52 expect(s1 != s2, isTrue, reason: 'The source values should be unequal'); |
| 55 | 53 |
| 56 var escapedS1 = escape(s1); | 54 var escapedS1 = escape(s1); |
| 57 var escapedS2 = escape(s2); | 55 var escapedS2 = escape(s2); |
| 58 | 56 |
| 59 // Explicitly not using the equals matcher | 57 // Explicitly not using the equals matcher |
| 60 expect(escapedS1 != escapedS2, isTrue, | 58 expect(escapedS1 != escapedS2, isTrue, |
| 61 reason: 'Unequal strings, when escaped, should remain unequal.'); | 59 reason: 'Unequal strings, when escaped, should remain unequal.'); |
| 62 }); | 60 }); |
| 63 } | 61 } |
| OLD | NEW |