More git-ignore xtests

The new tests make sure that the git-ignored files are skipped in every view.
This commit is contained in:
Benjamin Sago 2020-10-17 21:59:15 +01:00
parent d8b21a33b5
commit 06c899cac0
12 changed files with 127 additions and 19 deletions

86
xtests/git-ignore.toml Normal file
View File

@ -0,0 +1,86 @@
# Git-ignoring
[[cmd]]
name = "exa --git-ignore skips Git-ignored files"
shell = "exa --git-ignore /testcases/git2/ignoreds"
environment = { COLUMNS = "80" }
stdout = { file = "outputs/git2_ignoreds_grid_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'grid', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -1 skips Git-ignored files"
shell = "exa --git-ignore -1 /testcases/git2/ignoreds"
stdout = { file = "outputs/git2_ignoreds_lines_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'oneline', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -l skips Git-ignored files"
shell = "exa --git-ignore -l /testcases/git2/ignoreds"
stdout = { file = "outputs/git2_ignoreds_long_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -lG skips Git-ignored files"
shell = "exa --git-ignore -lG /testcases/git2/ignoreds"
environment = { COLUMNS = "150" }
stdout = { file = "outputs/git2_ignoreds_long_grid_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -lR skips Git-ignored files"
shell = "exa --git-ignore -lR /testcases/git2/ignoreds"
stdout = { file = "outputs/git2_ignoreds_long_recurse_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'recurse', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -lT skips Git-ignored files"
shell = "exa --git-ignore -lT /testcases/git2/ignoreds"
stdout = { file = "outputs/git2_ignoreds_long_tree_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'tree', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -T skips Git-ignored files"
shell = "exa --git-ignore -T /testcases/git2/ignoreds"
stdout = { file = "outputs/git2_ignoreds_tree_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'tree', 'git-ignore' ]
# Recursive git-ignoring
[[cmd]]
name = "exa --git-ignore -lR skips Git-ignored files in subfolders"
shell = "exa --git-ignore -lR /testcases/git2"
stdout = { file = "outputs/git2_long_recurse_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'recurse', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -lT skips Git-ignored files in subfolders"
shell = "exa --git-ignore -lT /testcases/git2"
stdout = { file = "outputs/git2_long_tree_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'tree', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -T skips Git-ignored files in subfolders"
shell = "exa --git-ignore -T /testcases/git2"
stdout = { file = "outputs/git2_tree_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'tree', 'git-ignore' ]

View File

@ -181,22 +181,3 @@ stdout = { file = "outputs/files_long_grid_1col.ansitxt" }
stderr = { empty = true } stderr = { empty = true }
status = 0 status = 0
tags = [ 'env', 'long', 'grid', 'git' ] tags = [ 'env', 'long', 'grid', 'git' ]
# Git-ignoring
[[cmd]]
name = "exa --git-ignore -lR skips Git-ignored files"
shell = "exa --git-ignore -lR /testcases/git2"
stdout = { file = "outputs/git2_long_recurse_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'git-ignore' ]
[[cmd]]
name = "exa --git-ignore -lT skips Git-ignored files"
shell = "exa --git-ignore -lT /testcases/git2"
stdout = { file = "outputs/git2_long_tree_gitignore.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'long', 'git-ignore' ]

View File

@ -18,6 +18,15 @@ stderr = { empty = true }
status = 0 status = 0
tags = [ 'env', 'grid', 'across' ] tags = [ 'env', 'grid', 'across' ]
[[cmd]]
name = "exa -d displays, ., .., and / correctly"
shell = "exa -d . .. /"
environment = { COLUMNS = "80" }
stdout = { file = "outputs/dirs_grid.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'grid', 'list-dirs' ]
# recurse tests # recurse tests

View File

@ -0,0 +1 @@
. .. /

View File

@ -0,0 +1 @@
music.m4a nested

View File

@ -0,0 +1,2 @@
music.m4a
nested

View File

@ -0,0 +1,2 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 nested

View File

@ -0,0 +1 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a drwxrwxr-x - cassowary  1 Jan 12:34 nested

View File

@ -0,0 +1,5 @@
.rw-rw-r-- 0 cassowary  1 Jan 12:34 music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 nested
/testcases/git2/ignoreds/nested:
.rw-rw-r-- 0 cassowary  1 Jan 12:34 funky chicken.m4a

View File

@ -0,0 +1,4 @@
drwxrwxr-x - cassowary  1 Jan 12:34 /testcases/git2/ignoreds
.rw-rw-r-- 0 cassowary  1 Jan 12:34 ├── music.m4a
drwxrwxr-x - cassowary  1 Jan 12:34 └── nested
.rw-rw-r-- 0 cassowary  1 Jan 12:34  └── funky chicken.m4a

View File

@ -0,0 +1,4 @@
/testcases/git2/ignoreds
├── music.m4a
└── nested
 └── funky chicken.m4a

View File

@ -0,0 +1,12 @@
/testcases/git2
├── deeply
│ └── nested
│ ├── directory
│ │ ├── l8st
│ │ └── upd8d
│ └── repository
│ └── subfile
└── ignoreds
 ├── music.m4a
 └── nested
 └── funky chicken.m4a