Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: test/file_message_test.dart

Issue 2056913002: Fix a message bug. (Closed) Base URL: git@github.com:dart-lang/source_span@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/file_message_test.dart
diff --git a/test/file_message_test.dart b/test/file_message_test.dart
index 5935c58820e76a8ba7ea42d2c2ca2bdb51b19c4f..d78a65172a34078923ae65fbfdc81fa29950ca7b 100644
--- a/test/file_message_test.dart
+++ b/test/file_message_test.dart
@@ -59,6 +59,15 @@ zip zap zop
^"""));
});
+ test("works for a point span at the end of the file with no trailing newline",
+ () {
+ file = new SourceFile("zip zap zop");
+ expect(file.location(11).pointSpan().message("oh no"), equals("""
+line 1, column 12: oh no
+zip zap zop
+ ^"""));
+ });
+
test("works for a point span in an empty file", () {
expect(new SourceFile("").location(0).pointSpan().message("oh no"),
equals("""
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698