Skip to content

Commit 7a096ff

Browse files
committed
Support ack3-only
1 parent 603bd00 commit 7a096ff

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

t/ack-1.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
name: All the Montresors
3+
ack3-only: true
34
args: Montresor -h t/text
45
stdout: |
56
the catacombs of the Montresors.
@@ -8,29 +9,34 @@ stdout: |
89
910
---
1011
name: Stop at one Montresor
12+
ack3-only: true
1113
args: Montresor -1 -h t/text
1214
stdout: |
1315
the catacombs of the Montresors.
1416
1517
---
1618
name: With dash v
19+
ack3-only: true
1720
args: c -1 -h -v t/text/raven.txt
1821
stdout: ' Only this and nothing more."'
1922

2023
---
2124
name: Dash f
25+
ack3-only: true
2226
args: -1 -f --sort-files t/swamp
2327
stdout:
2428
t/swamp/0
2529

2630
---
2731
name: Dash g
32+
ack3-only: true
2833
args: -1 -g fresh t/
2934
stdout:
3035
t/swamp/fresh.css
3136

3237
---
3338
name: Dash l
39+
ack3-only: true
3440
args: -1 -l --sort-files the t/text
3541
stdout: |
3642
t/text/amontillado.txt

t/run_yaml_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@ def test_all_yaml_files():
2222
"""
2323
filenames = sorted(glob.glob('t/*.yaml'))
2424
for filename in filenames:
25-
logger.info('YAML: %s' % filename)
25+
skipped_ack3_only = 0
26+
logger.info(f'YAML: {filename}')
2627
with open(filename, 'r', encoding='UTF-8') as f:
2728
cases = yaml.load_all(f, yaml.FullLoader)
2829
for case in cases:
2930
case = massage_case(case)
30-
run_case(case)
31+
if case.get('ack3-only', False):
32+
skipped_ack3_only += 1
33+
else:
34+
run_case(case)
35+
if skipped_ack3_only:
36+
logger.info(f' Skipped {skipped_ack3_only} ack3-only case(s)')
37+
3138

3239

3340
def massage_case(case: dict):

0 commit comments

Comments
 (0)