diff options
author | 2018-05-24 07:32:52 -0700 | |
---|---|---|
committer | 2018-05-24 07:33:48 -0700 | |
commit | 17f8d4e5a36f5c4bd020ce9163f5b1db62679e2c (patch) | |
tree | 9b065d3c27259a5da38563fcda505c3f7002275c /src/test/java/com/google/devtools/build/lib/pkgcache | |
parent | 2a6051b0c74ce59e30522fbd509ccbb460289df7 (diff) |
Reject files when the first line is indented.
A bug in the lexer ignored indentation on the first line of a file. This now
causes an error.
Also, remove the COMMENT token from the lexer. Comments are now accessed separately. This will allow further optimizations in the lexer. It also aligns the code a bit more with the Go implementation.
RELNOTES[INC]:
Indentation on the first line of a file was previously ignored. This is now fixed.
PiperOrigin-RevId: 197889775
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/pkgcache')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java index ba07b6841a..df3c5c840a 100644 --- a/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java +++ b/src/test/java/com/google/devtools/build/lib/pkgcache/PackageCacheTest.java @@ -488,8 +488,7 @@ public class PackageCacheTest extends FoundationTestCase { @Test public void testAddedBuildFileCausesLabelToBecomeInvalid() throws Exception { reporter.removeHandler(failFastHandler); - scratch.file( - "pkg/BUILD", " cc_library(name = 'foo', ", " srcs = ['x/y.cc'])"); + scratch.file("pkg/BUILD", "cc_library(name = 'foo', srcs = ['x/y.cc'])"); assertLabelValidity(true, "//pkg:x/y.cc"); |