mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 06:21:30 +00:00
Fix resolve_input_uri_test on windows.
Change-Id: I3d6af338f0b0887b613258c6b2af3ea7c0f2eddd Reviewed-on: https://dart-review.googlesource.com/60325 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
parent
5bf6436bc9
commit
38eda19be6
|
@ -2,6 +2,8 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import 'dart:io' show Platform;
|
||||
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'resolve_input_uri.dart';
|
||||
|
@ -17,8 +19,15 @@ main() {
|
|||
});
|
||||
|
||||
test('unknown schemes are not recognized by default', () {
|
||||
expect(resolveInputUri('test:foo').scheme, 'file');
|
||||
expect(resolveInputUri('org-dartlang-foo:bar').scheme, 'file');
|
||||
expect(resolveInputUri('c:/foo').scheme, 'file');
|
||||
if (Platform.isWindows) {
|
||||
/// : is an invalid path character in windows.
|
||||
expect(() => resolveInputUri('test:foo').scheme, throws);
|
||||
expect(() => resolveInputUri('org-dartlang-foo:bar').scheme, throws);
|
||||
} else {
|
||||
expect(resolveInputUri('test:foo').scheme, 'file');
|
||||
expect(resolveInputUri('org-dartlang-foo:bar').scheme, 'file');
|
||||
}
|
||||
});
|
||||
|
||||
test('more schemes can be supported', () {
|
||||
|
|
Loading…
Reference in a new issue