6 ## ----------------------------- ##
7 ## AS_DIRNAME & AS_DIRNAME_SED. ##
8 ## ----------------------------- ##
12 AT_SETUP([[AS_DIRNAME & AS_DIRNAME_SED]])
15 [[AC_PLAIN_SCRIPT()dnl
20 define([AS_DIRNAME_TEST],
21 [dir=`AS_DIRNAME([$1])`
23 echo "dirname($1) = $dir instead of $2" >&2
25 dir=`AS_DIRNAME_SED([$1])`
27 echo "dirname_sed($1) = $dir instead of $2" >&2])
29 AS_DIRNAME_TEST([//1], [//])
30 AS_DIRNAME_TEST([/1], [/])
31 AS_DIRNAME_TEST([./1], [.])
32 AS_DIRNAME_TEST([../../2], [../..])
33 AS_DIRNAME_TEST([//1/], [//])
34 AS_DIRNAME_TEST([/1/], [/])
35 AS_DIRNAME_TEST([./1/], [.])
36 AS_DIRNAME_TEST([../../2], [../..])
37 AS_DIRNAME_TEST([//1/3], [//1])
38 AS_DIRNAME_TEST([/1/3], [/1])
39 AS_DIRNAME_TEST([./1/3], [./1])
40 AS_DIRNAME_TEST([../../2/3], [../../2])
41 AS_DIRNAME_TEST([//1/3///], [//1])
42 AS_DIRNAME_TEST([/1/3///], [/1])
43 AS_DIRNAME_TEST([./1/3///], [./1])
44 AS_DIRNAME_TEST([../../2/3///], [../../2])
45 AS_DIRNAME_TEST([//1//3/], [//1])
46 AS_DIRNAME_TEST([/1//3/], [/1])
47 AS_DIRNAME_TEST([./1//3/], [./1])
48 AS_DIRNAME_TEST([../../2//3/], [../../2])
65 AT_SETUP([[AS_MKDIR_P]])
67 AT_DATA([configure.ac],
68 [[AC_PLAIN_SCRIPT()dnl
74 AS_MKDIR_P(["$pwd/1/2/3/4/5/6"])
75 test -d "$pwd/1/2/3/4/5/6" ||
76 AC_MSG_ERROR([$pwd/1/2/3/4/5/6 has not been properly created])
78 AS_MKDIR_P(["a/b/c/d/e/f"])
79 test -d a/b/c/d/e/f ||
80 AC_MSG_ERROR([a/b/c/d/e/f has not been properly created])
87 AT_CLEANUP(configure 1 a)
92 ## ----------------------------- ##
93 ## Negated classes in globbing. ##
94 ## ----------------------------- ##
96 # It is known that `[^...]' is not universally supported, but it is
97 # unknown for `[!...]'.
99 AT_SETUP([Negated classes in globbing])
101 AT_DATA([configure.ac],
102 [[AC_PLAIN_SCRIPT()dnl
105 case 'with!two!bangs' in
107 *) AC_MSG_ERROR([[`*[!a-z]*' didn't match `with!two!bangs']]);;
111 *[[!a-z]]*) AC_MSG_ERROR([[`*[!a-z]*' matched `without']]);;
118 AT_CLEANUP(configure)