Skip to content

Commit a5c4f01

Browse files
authored
Use a raw string for console logging with path (#2177)
Fixes #2176 On windows a path can include a `\` followed by a letter that is not a valid escape code in a Dart string. Prefix the string with `r` to make it a raw string and log the path directly.
1 parent fe3102e commit a5c4f01

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

pkgs/test/CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
## 1.25.2
2+
3+
* Fix a bug running browser tests with paths containing windows directory
4+
separator follow by a character which is an invalid Dart string escape
5+
sequence.
6+
17
## 1.25.1
28

39
* Fix a bug where in precompiled mode, html files for tests were no longer
410
created.
5-
611
* Support the latest version of `package:js`.
712
* Document the silent reporter in CLI help output.
813

pkgs/test/lib/src/runner/browser/compilers/dart2js.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class Dart2JsSupport extends CompilerSupport with JsHtmlWrapper {
118118
import '${await absoluteUri(dartPath)}' as test;
119119
120120
void main() {
121-
dom.window.console.log('Startup for test path $dartPath');
121+
dom.window.console.log(r'Startup for test path $dartPath');
122122
internalBootstrapBrowserTest(() => test.main);
123123
}
124124
''';

pkgs/test/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 1.25.1
2+
version: 1.25.2
33
description: >-
44
A full featured library for writing and running Dart tests across platforms.
55
repository: https://github.com/dart-lang/test/tree/master/pkgs/test

0 commit comments

Comments
 (0)