2018-05-31 00:35:35 +02:00
|
|
|
// Copyright 2018 Google Inc. Use of this source code is governed by an
|
|
|
|
// MIT-style license that can be found in the LICENSE file or at
|
|
|
|
// https://opensource.org/licenses/MIT.
|
|
|
|
|
|
|
|
@TestOn('vm')
|
|
|
|
|
|
|
|
import 'package:test/test.dart';
|
2019-04-04 21:17:36 +02:00
|
|
|
import 'package:test_descriptor/test_descriptor.dart' as d;
|
2018-05-31 00:35:35 +02:00
|
|
|
|
|
|
|
import '../dart_test.dart';
|
|
|
|
import '../shared/errors.dart';
|
|
|
|
|
|
|
|
void main() {
|
2018-06-27 22:12:16 +02:00
|
|
|
setUpAll(ensureSnapshotUpToDate);
|
2018-05-31 00:35:35 +02:00
|
|
|
sharedTests(runSass);
|
2019-04-04 21:17:36 +02:00
|
|
|
|
|
|
|
test("for package urls", () async {
|
|
|
|
await d.file("test.scss", "@import 'package:nope/test';").create();
|
|
|
|
|
|
|
|
var sass = await runSass(["--no-unicode", "test.scss"]);
|
|
|
|
expect(
|
|
|
|
sass.stderr,
|
|
|
|
emitsInOrder([
|
|
|
|
"Error: Can't find stylesheet to import.",
|
|
|
|
" ,",
|
|
|
|
"1 | @import 'package:nope/test';",
|
|
|
|
" | ^^^^^^^^^^^^^^^^^^^",
|
|
|
|
" '",
|
|
|
|
" test.scss 1:9 root stylesheet"
|
|
|
|
]));
|
|
|
|
await sass.shouldExit(65);
|
|
|
|
});
|
2018-05-31 00:35:35 +02:00
|
|
|
}
|