-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_fake_repos.sh
More file actions
executable file
·101 lines (85 loc) · 2 KB
/
create_fake_repos.sh
File metadata and controls
executable file
·101 lines (85 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env bash
set -e
ROOT="glob-zoo"
rm -rf "$ROOT"
mkdir -p "$ROOT"
cd "$ROOT"
echo "🧪 Creating glob torture repo..."
# ---------- directory depth ----------
mkdir -p shallow
mkdir -p deep/a/b/c
mkdir -p deep/x/y/z
mkdir -p dotfiles
mkdir -p symbols
mkdir -p numeric
mkdir -p mixed
# ---------- basic files ----------
touch README.md
touch test.md test.c test.txt
touch test1 test2 testA testa
touch test_file test-file test.file
touch testfile testXfile testYfile
# ---------- question mark / length ----------
touch test1test test2test testAtest
touch aaaa bbbb cccc
touch testAAA testBBB
# ---------- ranges ----------
touch testa testb testc testd
touch test0 test5 test9
touch testa1 testb2 testc3
touch testz9 testA0
# ---------- bracket madness ----------
touch testa- test-a test[a] test[a-z]
touch test- test--
touch testabc testdef testghi
touch abc def ghi
# ---------- numeric ----------
touch numeric/0 numeric/1 numeric/9
touch numeric/a1 numeric/1a numeric/99
touch numeric/file1 numeric/file2
# ---------- POSIX classes ----------
touch Alpha
touch LOWER
touch upper lower
touch MixedCase
touch space\ file
touch tab$'\t'file 2>/dev/null || true
# ---------- symbols ----------
touch symbols/'*'
touch symbols/'?'
touch symbols/'['
touch symbols/']'
touch symbols/'!'
touch symbols/'^'
touch symbols/'-'
touch symbols/'\*'
touch symbols/'\?'
# ---------- dotfiles ----------
touch .hidden
touch .test
touch .testfile
touch dotfiles/.a
touch dotfiles/.z
# ---------- multi-extension ----------
touch test.md.bak
touch test.backup.md
touch test.xx.c
touch test.aa.c
# ---------- deep files ----------
touch deep/a/b/c/test1
touch deep/a/b/c/testA
touch deep/a/b/c/file9
touch deep/x/y/z/alpha1
touch deep/x/y/z/beta2
# ---------- wild concatenations ----------
touch a*b a*b*c
touch aXbXc
touch test123test
touch testABCtest
# ---------- underscore / word ----------
touch test_word
touch test123_
touch _private
touch __init__
echo "✅ Repo created: $ROOT"
echo "👉 cd into it and run your glob echo tests"