mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 17:24:50 +01:00
48147/0001: tests: Add a unit test for zmathfunc and a regression test for workers/48146 affecting it.
This commit is contained in:
parent
5ede2c55f1
commit
6a2a8acf09
2 changed files with 28 additions and 0 deletions
|
@ -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
|
||||
|
|
23
Test/Z02zmathfunc.ztst
Normal file
23
Test/Z02zmathfunc.ztst
Normal file
|
@ -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
|
Loading…
Reference in a new issue