mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-01-19 10:32:45 +08:00
builtin_string: extra tests
This commit is contained in:
parent
2b9158ddab
commit
efe94344e2
|
@ -45,12 +45,24 @@ string length -q ""; and echo not zero length; or echo zero length
|
|||
string pad -l foo
|
||||
# CHECK: foo
|
||||
|
||||
string pad -l -n 2 foo
|
||||
# CHECK: foo
|
||||
|
||||
string pad -r -n 4 -c '-' foo
|
||||
# CHECK: foo----
|
||||
|
||||
string pad --left --right -n 2 -c '=' foo
|
||||
# CHECK: ==foo==
|
||||
|
||||
string pad --left -m 4 -c '=' foo
|
||||
# CHECK: =foo
|
||||
|
||||
string pad --left --right -m 6 --chars '=' foo
|
||||
# CHECK: ==foo=
|
||||
|
||||
string pad --left --right -m 7 --chars '-' bar
|
||||
# CHECK: --bar--
|
||||
|
||||
string sub --length 2 abcde
|
||||
# CHECK: ab
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user