summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2022-11-23 14:21:25 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2022-11-23 14:22:02 +0000
commit291940bae6cc0471c35c73498e873bc58dae9a95 (patch)
treec23f329497bc0b57c2a73abd6a62ac818e6ba23a
parente4aeb3b911d1909a4d150ec832159b97ebec2a40 (diff)
downloadzsh-291940bae6cc0471c35c73498e873bc58dae9a95.tar.gz
zsh-291940bae6cc0471c35c73498e873bc58dae9a95.zip
unposted (cf. 51016): Add a test case for underscore-followed-by-digits in math context.
-rw-r--r--ChangeLog5
-rw-r--r--Test/C01arith.ztst8
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c0fe24965..2ae9ccade 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-11-23 Daniel Shahaf <d.s@daniel.shahaf.name>
+
+ * unposted (cf. 51016): Test/C01arith.ztst: Add a test case
+ for underscore-followed-by-digits in math context.
+
2022-11-17 Oliver Kiddle <opk@zsh.org>
* unposted (c.f. Norikatsu Shigemura: github #96):
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index d0092fefa..ba9c65e5b 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -251,6 +251,14 @@
>5000
>255
+ set -- {101..120}
+ _10=42
+ echo $_10 : $1_0
+ echo $(( _10 )) : $(( 1_0 ))
+0:underscores in front of a numeric identifier is not a math constant
+>42 : 101_0
+>42 : 10
+
# Force floating point.
for expr in "3/4" "0x100/0x200" "0x30/0x10"; do
print $(( $expr ))