60 lines
1.4 KiB
Bash
Executable File
60 lines
1.4 KiB
Bash
Executable File
#! /bin/sh
|
|
LOCAL=.
|
|
echo "-------- test1"
|
|
./basename.sh xyz/mouse/z
|
|
$LOCAL/basename xyz/mouse/z
|
|
echo "-------- test2"
|
|
./basename.sh /xyz/mouse/z
|
|
$LOCAL/basename /xyz/mouse/z
|
|
echo "-------- test3"
|
|
./basename.sh
|
|
$LOCAL/basename
|
|
echo "-------- test4"
|
|
./basename.sh //////
|
|
$LOCAL/basename //////
|
|
echo "-------- test5"
|
|
./basename.sh string string
|
|
$LOCAL/basename string string
|
|
echo "-------- test6"
|
|
./basename.sh string
|
|
$LOCAL/basename string
|
|
echo "-------- test7 Should be different"
|
|
./basename.sh 0string string
|
|
$LOCAL/basename 0string string
|
|
echo "-------- test8"
|
|
./basename.sh \foo\string string
|
|
$LOCAL/basename \foo\string string
|
|
echo "-------- test9"
|
|
./basename.sh \foo\string st
|
|
$LOCAL/basename \foo\string st
|
|
echo "-------- test10"
|
|
./basename.sh ////// suffix
|
|
$LOCAL/basename ////// suffix
|
|
echo "-------- test11"
|
|
./basename.sh one two three
|
|
$LOCAL/basename one two three
|
|
echo "-------- test12"
|
|
./basename.sh xfc.fc .fc
|
|
$LOCAL/basename xfc.fc .fc
|
|
echo "-------- test13"
|
|
./basename.sh xfc.fc fc
|
|
$LOCAL/basename xfc.fc fc
|
|
echo "-------- test14"
|
|
./basename.sh x.C .[iC]
|
|
$LOCAL/basename x.C .[iC]
|
|
echo "-------- test15"
|
|
./basename.sh xfc.fc .f[ic]
|
|
$LOCAL/basename xfc.fc .f[ic]
|
|
echo "-------- test16"
|
|
./basename.sh x.c .?
|
|
$LOCAL/basename x.c .?
|
|
echo "-------- test17"
|
|
./basename.sh x.c .*
|
|
$LOCAL/basename x.c .*
|
|
echo "-------- test18"
|
|
./basename.sh xfc '\.c'
|
|
$LOCAL/basename xfc '\.c'
|
|
echo "-------- test19"
|
|
./basename.sh x.c '\.c'
|
|
$LOCAL/basename x.c '\.c'
|