Index: recipes/test/core/strings/escaping_characters_test.dart |
diff --git a/recipes/test/core/strings/escaping_characters_test.dart b/recipes/test/core/strings/escaping_characters_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a239beddb9a29cf6da3642e7329b53b3a3866e0d |
--- /dev/null |
+++ b/recipes/test/core/strings/escaping_characters_test.dart |
@@ -0,0 +1,30 @@ |
+library escaping_characters_test; |
+ |
+import 'package:unittest/unittest.dart'; |
+ |
+void main() { |
+ |
+ group('escaping characters', () { |
+ var name = '''Wile |
+Coyote'''; |
+ |
+ test('using an escape character', () { |
+ expect('Wile\nCoyote', equals('''Wile |
+Coyote''')); |
+ }); |
+ |
+ test('using hex notation', () { |
+ expect('Wile\x0ACoyote', equals('''Wile |
+Coyote''')); |
+ }); |
+ |
+ test('using unicode notation', () { |
+ expect('Wile\u000ACoyote', equals('''Wile |
+Coyote''')); |
+ }); |
+ |
+ test('with non-special character', () { |
+ expect('Wile \E Coyote', equals('Wile E Coyote')); |
+ }); |
+ }); |
+} |