Return 1 if non-existent field is given

This commit is contained in:
Jason Nader
2020-03-24 23:25:37 +09:00
committed by Fabian Homborg
parent 1329a40e87
commit 21bbd2ecb4
2 changed files with 7 additions and 4 deletions

View File

@@ -95,8 +95,8 @@ string split --fields=3,2 "" abc
# CHECK: c
# CHECK: b
string split --fields=2,9 "" abc
# CHECK: b
string split --fields=2,9 "" abc; or echo "exit 1"
# CHECK: exit 1
string split --fields=1-3,5,9-7 "" 123456789
# CHECK: 1