diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-14 12:55:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-11-14 13:20:08 +0200 |
commit | 5ec57d68a5205173a02c34a24d7129347d43196c (patch) | |
tree | 303de46753bcde9f9ccff094d6591b6bb7583931 /old-tests | |
parent | 62a688e3fd7d1fdb8ce5590ebe9cb99e90cbe5d7 (diff) |
Tighten up attribute recognition during parsing
Now it should be possible to use `[]` for wildcard patterns, for example:
foo = foo.[hit]xx
Note that a leading bracket expression will still be recognized as attributes
and escaping or quoting it will inhibit pattern matching. To resolve this case
we need to specify an empty attribute list:
foo = [] [abc]-foo.cxx
Diffstat (limited to 'old-tests')
-rw-r--r-- | old-tests/attribute/buildfile | 4 | ||||
-rwxr-xr-x | old-tests/variable/override/test.sh | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/old-tests/attribute/buildfile b/old-tests/attribute/buildfile index 7338641..a9abf24 100644 --- a/old-tests/attribute/buildfile +++ b/old-tests/attribute/buildfile @@ -6,10 +6,10 @@ #[foo=dir/file{bar}] # error: invalid attribute key #[foo] print hello # error: attributes before print -#[foo]./ # error: attributes before directory scope +#[foo] ./ # error: attributes before directory scope #{ #} -#[foo]./: # error: attributes before target scope +#[foo] ./: # error: attributes before target scope #./: [foo] buildfile # error: attributes before prerequisites #import [foo] libz # error: attributes without variable diff --git a/old-tests/variable/override/test.sh b/old-tests/variable/override/test.sh index 94ed61f..4675b7e 100755 --- a/old-tests/variable/override/test.sh +++ b/old-tests/variable/override/test.sh @@ -53,8 +53,7 @@ function test () fi } -fail foo=bar[] # error: unexpected [ in variable assignment 'foo=bar[]' -fail foo=[string]bar # error: typed override of variable foo +fail "foo= [string] bar" # error: typed override of variable foo #fail "!foo=bar" "!foo=BAR" # error: multiple global overrides of variable foo #fail "foo=bar" "foo=BAR" # error: multiple project overrides of variable foo #fail "%foo=bar" "%foo=BAR" # error: multiple project overrides of variable foo |