diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2021-03-07 16:58:03 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2021-03-07 21:58:12 +0000 |
commit | 6a2a8acf09bc39795f18cc60e90a0d4427d36edd (patch) | |
tree | 7dfdfd6d432332e9ca78fe345b480f393217ed91 | |
parent | 5ede2c55f144593c16498c3131a76e188114a9c6 (diff) | |
download | zsh-6a2a8acf09bc39795f18cc60e90a0d4427d36edd.tar.gz zsh-6a2a8acf09bc39795f18cc60e90a0d4427d36edd.tar.xz zsh-6a2a8acf09bc39795f18cc60e90a0d4427d36edd.zip |
48147/0001: tests: Add a unit test for zmathfunc and a regression test for workers/48146 affecting it.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Test/Z02zmathfunc.ztst | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 417a63797..d77fb2df5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2021-03-07 Daniel Shahaf <d.s@daniel.shahaf.name> + + * 48147/0001: Test/Z02zmathfunc.ztst: tests: Add a unit test for + zmathfunc and a regression test for workers/48146 affecting it. + 2021-02-24 Peter Stephenson <p.stephenson@samsung.com> * 48105: Jacob Gelbman:Completion/Unix/Command/_ctags: update and diff --git a/Test/Z02zmathfunc.ztst b/Test/Z02zmathfunc.ztst new file mode 100644 index 000000000..94bc59576 --- /dev/null +++ b/Test/Z02zmathfunc.ztst @@ -0,0 +1,23 @@ +%prep + autoload -Uz zmathfunc && zmathfunc + +%test + + echo $(( min(42, 43) )) $(( max(42, 43) )) $(( sum(42, 43) )) + echo $(( min(42) )) $(( max(42) )) $(( sum(42) )) + echo $(( sum() )) +0:basic functionality test +>42 43 85 +>42 42 42 +>0 + + + (set -e; echo $(( min(0, 42) ))) + (set -e; echo $(( max(0, -42) ))) + (set -e; echo $(( sum(42, -42) ))) +-f:regression test for ERR_EXIT +>0 +>0 +>0 + +%clean |