string repeat of an empty string is an error

Fixes #3898
This commit is contained in:
Kurtis Rader
2017-03-15 13:55:53 -07:00
parent 6fd8dc44fb
commit f0469d829a
2 changed files with 10 additions and 2 deletions

View File

@@ -132,4 +132,12 @@ echo 'stdin' | string repeat -n1 'and arg'; or echo "exit 2"
string repeat -n; or echo "exit 2"
string repeat -l fakearg 2>&1 | head -n1 1>&2
string repeat -l fakearg 2>&1 | head -n1 1>&2
string repeat ''
and echo string repeat empty string did not fail
string repeat -n3 ''
and echo string repeat empty string did not fail
exit 0