Bugfix in tup
This commit is contained in:
parent
de116fcf9e
commit
6de7798c8a
2 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue