OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
6 import 'package:compiler/implementation/util/command_line.dart'; | 6 import 'package:compiler/src/util/command_line.dart'; |
7 | 7 |
8 main() { | 8 main() { |
9 Expect.listEquals(["foo", "bar"], splitLine("foo bar")); | 9 Expect.listEquals(["foo", "bar"], splitLine("foo bar")); |
10 Expect.listEquals(["foo", "bar"], splitLine("foo bar", windows: true)); | 10 Expect.listEquals(["foo", "bar"], splitLine("foo bar", windows: true)); |
11 | 11 |
12 Expect.listEquals(["foo bar"], splitLine(r"foo\ bar")); | 12 Expect.listEquals(["foo bar"], splitLine(r"foo\ bar")); |
13 Expect.listEquals(["foo\\", "bar"], splitLine(r"foo\ bar", windows: true)); | 13 Expect.listEquals(["foo\\", "bar"], splitLine(r"foo\ bar", windows: true)); |
14 | 14 |
15 Expect.listEquals(["foo'", '"bar'], splitLine(r"""foo\' \"bar""")); | 15 Expect.listEquals(["foo'", '"bar'], splitLine(r"""foo\' \"bar""")); |
16 Expect.listEquals(["foo\\'", '"bar'], | 16 Expect.listEquals(["foo\\'", '"bar'], |
(...skipping 25 matching lines...) Expand all Loading... |
42 | 42 |
43 Expect.listEquals(["C:Users\foo\bar\name with spaces.dart"], | 43 Expect.listEquals(["C:Users\foo\bar\name with spaces.dart"], |
44 splitLine(r'"C:\Users\foo\bar\name with spaces.dart"')); | 44 splitLine(r'"C:\Users\foo\bar\name with spaces.dart"')); |
45 Expect.listEquals([r"C:\Users\foo\bar\name with spaces.dart"], | 45 Expect.listEquals([r"C:\Users\foo\bar\name with spaces.dart"], |
46 splitLine(r'"C:\Users\foo\bar\name with spaces.dart"', windows: true)); | 46 splitLine(r'"C:\Users\foo\bar\name with spaces.dart"', windows: true)); |
47 | 47 |
48 Expect.throws(() => splitLine(r"\"), (e) => e is FormatException); | 48 Expect.throws(() => splitLine(r"\"), (e) => e is FormatException); |
49 Expect.throws(() => splitLine(r"\", windows: true), | 49 Expect.throws(() => splitLine(r"\", windows: true), |
50 (e) => e is FormatException); | 50 (e) => e is FormatException); |
51 } | 51 } |
OLD | NEW |