You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
391 B
12 lines
391 B
4 months ago
|
#!/bin/bash
|
||
|
|
||
|
[ -f testing.sh ] && . testing.sh
|
||
|
|
||
|
#testing "name" "command" "result" "infile" "stdin"
|
||
|
|
||
|
testing "/-only" "dirname ///////" "/\n" "" ""
|
||
|
testing "trailing /" "dirname a//////" ".\n" "" ""
|
||
|
testing "combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" ""
|
||
|
testing "/a/" "dirname /////a///" "/\n" "" ""
|
||
|
testing "multiple" "dirname hello/a world/b" "hello\nworld\n" "" ""
|