]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/globstar2.sub
Bash-4.4 distribution sources and documentation
[thirdparty/bash.git] / tests / globstar2.sub
CommitLineData
a0c0a00f
CR
1olddir=$PWD
2EMPTY=/tmp/empty
3
ac50fbac
CR
4shopt -s globstar
5s()
6{
7 printf '== <%s> ==\n' "$@"
8}
9p()
10{
11 printf '<%q>\n' "$@"
12}
13
a0c0a00f
CR
14mkdir -p $EMPTY/a/a/a
15cd $EMPTY
ac50fbac
CR
16
17# good
18p **
19p **/**
20p **/**/**
21
22rm -rf a
a0c0a00f
CR
23mkdir -p $EMPTY/{a,b}/{a,b}/{a,b}/{a,b}
24cd $EMPTY
ac50fbac
CR
25
26# good
27s '**/a'
28p **/a
29
30# good
31s 'a/**'
32p a/**
33
34# good
35s '**'
36p **
37
38# good
39s '**/**'
40p **/**
41
42# good
43s '**/**/**'
44p **/**/**
45
46# good
47s '**/**/**/**/**'
48p **/**/**/**/**
49
50# good
51s '**/**/a'
52p **/**/a
53
54# good
55s 'a/**/**'
56p a/**/**
57
58# good
59s 'a/**/**/**'
60p a/**/**/**
61
62# good
63s 'a/**/**/**/**'
64p a/**/**/**/**
65
66# same as ksh93
67s '**/a/**'
68p **/a/**
69
70# same as ksh93
71s '**/a/**/**'
72p **/a/**/**
73
74# same as ksh93
75s '**/a/**/**/**'
76p **/a/**/**/**
77
78# good
79s '**/**/a/**'
80p **/**/a/**
81
a0c0a00f
CR
82cd "$olddir"
83rm -rf $EMPTY