forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
75 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
AT_BANNER([test dir_name and base_name functions]) | ||
|
||
m4_define([CHECK_FILE_NAME], | ||
[AT_SETUP([components of "$1" are "$2", "$3"]) | ||
AT_KEYWORDS([dir_name base_name]) | ||
AT_CHECK([test-file_name "AS_ESCAPE($1)"], [0], [$2 | ||
$3 | ||
]) | ||
AT_CLEANUP]) | ||
|
||
# These are the test cases given in POSIX for dirname() and basename(). | ||
CHECK_FILE_NAME([/usr/lib], [/usr], [lib]) | ||
CHECK_FILE_NAME([/usr/], [/], [usr]) | ||
CHECK_FILE_NAME([usr], [.], [usr]) | ||
CHECK_FILE_NAME([/], [/], [/]) | ||
CHECK_FILE_NAME([.], [.], [.]) | ||
CHECK_FILE_NAME([..], [.], [..]) | ||
CHECK_FILE_NAME([//], [//], [//]) # / is also allowed | ||
CHECK_FILE_NAME([//foo], [//], [foo]) # / is also allowed for dirname | ||
CHECK_FILE_NAME([], [.], [.]) | ||
|
||
# Additional test cases. | ||
CHECK_FILE_NAME([dir/file], [dir], [file]) | ||
CHECK_FILE_NAME([dir/file/], [dir], [file]) | ||
CHECK_FILE_NAME([dir/file//], [dir], [file]) | ||
CHECK_FILE_NAME([///foo], [/], [foo]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters