Skip to content

Commit b1c4934

Browse files
committed
Add tests for common command-line errors
Specifically, making sure that they start with "exa", which is something that's been bugging me recently.
1 parent 550f2d2 commit b1c4934

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

xtests/errors.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Command-line errors
2+
3+
[[cmd]]
4+
name = "‘exa --aoeu’ displays an error"
5+
shell = "exa --aoeu"
6+
stdout = { empty = true }
7+
stderr = { file = "outputs/error_invalid_option.ansitxt" }
8+
status = 3
9+
tags = [ 'error' ]
10+
11+
[[cmd]]
12+
name = "‘exa -Taa’ displays an error"
13+
shell = "exa -Taa"
14+
stdout = { empty = true }
15+
stderr = { file = "outputs/error_tree_all_all.ansitxt" }
16+
status = 3
17+
tags = [ 'error' ]
18+
19+
120
# Error suggestions
221

322
[[cmd]]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exa: Unknown argument --aoeu
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
exa: Option --tree is useless given --all --all

0 commit comments

Comments
 (0)