Skip to content

Commit

Permalink
Add a regressoin test for #2203
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Mar 22, 2024
1 parent 9b4cfac commit 7da9624
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/cli/shared/update.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// MIT-style license that can be found in the LICENSE file or at
// https://opensource.org/licenses/MIT.

import 'package:path/path.dart' as p;
import 'package:test/test.dart';
import 'package:test_descriptor/test_descriptor.dart' as d;
import 'package:test_process/test_process.dart';
Expand Down Expand Up @@ -148,6 +149,18 @@ void sharedTests(Future<TestProcess> runSass(Iterable<String> arguments)) {
await d.file("out.css", "x {y: z}").validate();
});

// Regression test for #2203
test("whose sources weren't modified with an absolute path", () async {
await d.file("test.scss", "a {b: c}").create();
await d.file("out.css", "x {y: z}").create();

var sass = await update(["${p.absolute(d.path('test.scss'))}:out.css"]);
expect(sass.stdout, emitsDone);
await sass.shouldExit(0);

await d.file("out.css", "x {y: z}").validate();
});

test("whose sibling was modified", () async {
await d.file("test1.scss", "a {b: c}").create();
await d.file("out1.css", "x {y: z}").create();
Expand Down

0 comments on commit 7da9624

Please sign in to comment.