Bugfix in tup

This commit is contained in:
Sławomir Śledź 2018-03-10 22:22:06 +01:00
parent de116fcf9e
commit 6de7798c8a
2 changed files with 5 additions and 5 deletions

View file

@ -119,7 +119,7 @@ mul() {
( set -f; echo $(($1 * $2)) )
}
add() {
plus() {
echo $(($1 + $2))
}
@ -212,7 +212,7 @@ buff() {
local cnt=-1
for x in $@; do
[[ $x = '.' ]] && break
cnt=$(add $cnt 1)
cnt=$(plus $cnt 1)
done
local args=''
local i=$cnt

View file

@ -1,7 +1,7 @@
#! /bin/bash
testTupIfEmpty() {
assertEquals '()' $(tup)
assertEquals '()' $(tup '')
}
testTupIfOneElement() {
@ -28,8 +28,8 @@ testTupxHappyPath() {
}
testTupxIfEmpty() {
assertEquals '' "$(tup | tupx 1)"
assertEquals '' "$(tup | tupx 5)"
assertEquals '' "$(tup '' | tupx 1)"
assertEquals '' "$(tup '' | tupx 5)"
}
testTupxIfZeroIndex() {