diff options
author | Filipe Brandenburger <filbranden@google.com> | 2018-05-23 14:04:27 -0700 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2018-05-23 14:07:56 -0700 |
commit | fa04e5c8fb24632869cff316ae4765996821287a (patch) | |
tree | c6cf47c3d146b036a782f261e95b839ae62d7e6a | |
parent | 5572bbc6cc4b28839cc2171e55ecd5b1f97cda13 (diff) | |
download | meson-fa04e5c8fb24632869cff316ae4765996821287a.zip meson-fa04e5c8fb24632869cff316ae4765996821287a.tar.gz meson-fa04e5c8fb24632869cff316ae4765996821287a.tar.bz2 |
Add a testing case for a decimal number with a leading zero
That syntax is invalid, since decimal numbers should never have a
leading zero and octal numbers use the `0o` prefix instead.
This matches Python 3 syntax which does not accept it:
$ python3
>>> 0123
File "<stdin>", line 1
0123
^
SyntaxError: invalid token
>>>
Add a "failing" test case to confirm this property is preserved and no
regressions are introduced in this area.
-rw-r--r-- | test cases/failing/76 int literal leading zero/meson.build | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test cases/failing/76 int literal leading zero/meson.build b/test cases/failing/76 int literal leading zero/meson.build new file mode 100644 index 0000000..7ad64ae --- /dev/null +++ b/test cases/failing/76 int literal leading zero/meson.build @@ -0,0 +1,6 @@ + +# This should fail. +# Decimal syntax is 123. +# Octal syntax is 0o123. +fail_0123 = 0123 + |