blob: 81d6c00a194520de84fdbbc25589500d15e9199a [file] [log] [blame]
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS d.file
// 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.
library pub_tests;
import 'package:scheduled_test/scheduled_test.dart';
import '../descriptor.dart' as d;
import '../test_pub.dart';
import 'utils.dart';
main() {
initConfig();
integration("doesn't crash if an unused .dart file has a syntax error", () {
d.dir(appPath, [
d.pubspec({
"name": "myapp",
"transformers": ["myapp/src/transformer"]
}),
d.dir("lib", [d.dir("src", [
d.file("transformer.dart", REWRITE_TRANSFORMER),
d.file("unused.dart", "(*&^#@")
])]),
d.dir("web", [
d.file("foo.txt", "foo")
])
]).create();
createLockFile('myapp', pkg: ['barback']);
var server = pubServe();
server.stderr.expect("[RewriteImport]:");
server.stderr.expect(startsWith("Error in myapp|lib/src/unused.dart:"));
requestShouldSucceed("foo.out", "foo.out");
endPubServe();
});
}