Skip to content

Commit f736bb0

Browse files
authored
Merge pull request #794 from akinomyoga/EXTRA_DIST
test(Makefile.am): update EXTRA_DIST in Makefile.am
2 parents 40aa4dc + 649afc7 commit f736bb0

File tree

3 files changed

+37
-51
lines changed

3 files changed

+37
-51
lines changed

test/t/Makefile.am

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ EXTRA_DIST = \
2121
test_apt_build.py \
2222
test_apt_cache.py \
2323
test_apt_get.py \
24+
test_apt_mark.py \
2425
test_aptitude.py \
2526
test_arch.py \
2627
test_arp.py \
@@ -256,6 +257,7 @@ EXTRA_DIST = \
256257
test_ip.py \
257258
test_ipcalc.py \
258259
test_iperf.py \
260+
test_iperf3.py \
259261
test_ipmitool.py \
260262
test_ipsec.py \
261263
test_iptables.py \

test/t/unit/Makefile.am

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
EXTRA_DIST = \
2+
test_unit_command_offset.py \
23
test_unit_count_args.py \
4+
test_unit_deprecate_func.py \
5+
test_unit_dequote.py \
36
test_unit_expand.py \
7+
test_unit_expand_glob.py \
48
test_unit_expand_tilde_by_ref.py \
59
test_unit_filedir.py \
610
test_unit_find_unique_completion_pair.py \
@@ -10,6 +14,7 @@ EXTRA_DIST = \
1014
test_unit_ip_addresses.py \
1115
test_unit_known_hosts_real.py \
1216
test_unit_longopt.py \
17+
test_unit_looks_like_path.py \
1318
test_unit_parse_help.py \
1419
test_unit_parse_usage.py \
1520
test_unit_pgids.py \
@@ -18,7 +23,9 @@ EXTRA_DIST = \
1823
test_unit_quote.py \
1924
test_unit_quote_readline.py \
2025
test_unit_tilde.py \
26+
test_unit_unlocal.py \
2127
test_unit_variables.py \
28+
test_unit_xfunc.py \
2229
test_unit_xinetd_services.py
2330

2431
all:

test/t/unit/test_unit_expand_glob.py

Lines changed: 28 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,101 +6,78 @@
66
@pytest.mark.bashcomp(
77
cmd=None,
88
cwd="_filedir",
9-
ignore_env=r"^\+(my_array=|declare -f dump_array$)",
9+
ignore_env=r"^\+declare -f (dump_array|__tester)$",
1010
)
1111
class TestExpandGlob:
12-
def test_match_all(self, bash):
12+
@pytest.fixture(scope="class")
13+
def functions(self, bash):
1314
assert_bash_exec(
1415
bash,
15-
"dump_array() { ((${#my_array[@]})) && printf '<%s>' \"${my_array[@]}\"; echo; }",
16+
"dump_array() { ((${#arr[@]})) && printf '<%s>' \"${arr[@]}\"; echo; }",
1617
)
17-
output = assert_bash_exec(
18+
assert_bash_exec(
1819
bash,
19-
"LC_ALL= LC_COLLATE=C _comp_expand_glob my_array '*';dump_array",
20-
want_output=True,
20+
'__tester() { local LC_ALL= LC_COLLATE=C arr; _comp_expand_glob arr "$@";dump_array; }',
2121
)
22+
23+
def test_match_all(self, bash, functions):
24+
output = assert_bash_exec(bash, "__tester '*'", want_output=True)
2225
assert output.strip() == "<a b><a$b><a&b><a'b><ab><aé><brackets><ext>"
2326

24-
def test_match_pattern(self, bash):
25-
output = assert_bash_exec(
26-
bash,
27-
"LC_ALL= LC_COLLATE=C _comp_expand_glob my_array 'a*';dump_array",
28-
want_output=True,
29-
)
27+
def test_match_pattern(self, bash, functions):
28+
output = assert_bash_exec(bash, "__tester 'a*'", want_output=True)
3029
assert output.strip() == "<a b><a$b><a&b><a'b><ab><aé>"
3130

32-
def test_match_unmatched(self, bash):
31+
def test_match_unmatched(self, bash, functions):
3332
output = assert_bash_exec(
34-
bash,
35-
"_comp_expand_glob my_array 'unmatched-*';dump_array",
36-
want_output=True,
33+
bash, "__tester 'unmatched-*'", want_output=True
3734
)
3835
assert output.strip() == ""
3936

40-
def test_match_multiple_words(self, bash):
41-
output = assert_bash_exec(
42-
bash,
43-
"_comp_expand_glob my_array 'b* e*';dump_array",
44-
want_output=True,
45-
)
37+
def test_match_multiple_words(self, bash, functions):
38+
output = assert_bash_exec(bash, "__tester 'b* e*'", want_output=True)
4639
assert output.strip() == "<brackets><ext>"
4740

48-
def test_match_brace_expansion(self, bash):
41+
def test_match_brace_expansion(self, bash, functions):
4942
output = assert_bash_exec(
50-
bash,
51-
"_comp_expand_glob my_array 'brac{ket,unmatched}*';dump_array",
52-
want_output=True,
43+
bash, "__tester 'brac{ket,unmatched}*'", want_output=True
5344
)
5445
assert output.strip() == "<brackets>"
5546

56-
def test_protect_from_noglob(self, bash):
57-
with bash_env_saved(bash) as bash_env:
47+
def test_protect_from_noglob(self, bash, functions):
48+
with bash_env_saved(bash, functions) as bash_env:
5849
bash_env.set("noglob", True)
59-
output = assert_bash_exec(
60-
bash,
61-
"LC_ALL= LC_COLLATE=C _comp_expand_glob my_array 'a*';dump_array",
62-
want_output=True,
63-
)
50+
output = assert_bash_exec(bash, "__tester 'a*'", want_output=True)
6451
assert output.strip() == "<a b><a$b><a&b><a'b><ab><aé>"
6552

66-
def test_protect_from_failglob(self, bash):
53+
def test_protect_from_failglob(self, bash, functions):
6754
with bash_env_saved(bash) as bash_env:
6855
bash_env.shopt("failglob", True)
6956
output = assert_bash_exec(
70-
bash,
71-
"_comp_expand_glob my_array 'unmatched-*';dump_array",
72-
want_output=True,
57+
bash, "__tester 'unmatched-*'", want_output=True
7358
)
7459
assert output.strip() == ""
7560

76-
def test_protect_from_nullglob(self, bash):
61+
def test_protect_from_nullglob(self, bash, functions):
7762
with bash_env_saved(bash) as bash_env:
7863
bash_env.shopt("nullglob", False)
7964
output = assert_bash_exec(
80-
bash,
81-
"_comp_expand_glob my_array 'unmatched-*';dump_array",
82-
want_output=True,
65+
bash, "__tester 'unmatched-*'", want_output=True
8366
)
8467
assert output.strip() == ""
8568

86-
def test_protect_from_dotglob(self, bash):
69+
def test_protect_from_dotglob(self, bash, functions):
8770
with bash_env_saved(bash) as bash_env:
8871
bash_env.shopt("dotglob", True)
8972
output = assert_bash_exec(
90-
bash,
91-
"_comp_expand_glob my_array 'ext/foo/*';dump_array",
92-
want_output=True,
73+
bash, "__tester 'ext/foo/*'", want_output=True
9374
)
9475
assert output.strip() == ""
9576

96-
def test_protect_from_GLOBIGNORE(self, bash):
77+
def test_protect_from_GLOBIGNORE(self, bash, functions):
9778
with bash_env_saved(bash) as bash_env:
9879
# Note: dotglob is changed by GLOBIGNORE
9980
bash_env.save_shopt("dotglob")
10081
bash_env.write_variable("GLOBIGNORE", "*")
101-
output = assert_bash_exec(
102-
bash,
103-
"LC_ALL= LC_COLLATE=C _comp_expand_glob my_array 'a*';dump_array",
104-
want_output=True,
105-
)
82+
output = assert_bash_exec(bash, "__tester 'a*'", want_output=True)
10683
assert output.strip() == "<a b><a$b><a&b><a'b><ab><aé>"

0 commit comments

Comments
 (0)