Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.
Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:
• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.
I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.
The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.
So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 19:39:44 +00:00
|
|
|
|
# The first Git repo: additions and modifications
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column"
|
|
|
|
|
shell = "exa --git -l /testcases/git"
|
|
|
|
|
stdout = { file = "outputs/git1_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lR’ shows a Git status column in every table"
|
|
|
|
|
shell = "exa --git -lR /testcases/git"
|
|
|
|
|
stdout = { file = "outputs/git1_long_recurse.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lT’ shows a Git status column alongside the tree"
|
|
|
|
|
shell = "exa --git -lT /testcases/git"
|
|
|
|
|
stdout = { file = "outputs/git1_long_tree.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ with a directory argument shows the combined Git status column"
|
|
|
|
|
shell = "exa --git -l /testcases/git/moves/thither"
|
|
|
|
|
stdout = { file = "outputs/git1_long_moves.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column containing new files"
|
|
|
|
|
shell = "exa --git -l /testcases/git/additions"
|
|
|
|
|
stdout = { file = "outputs/git1_long_additions.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column containing modified files"
|
|
|
|
|
shell = "exa --git -l /testcases/git/edits"
|
|
|
|
|
stdout = { file = "outputs/git1_long_edits.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column containing multiple statuses"
|
|
|
|
|
shell = "exa --git -l /testcases/git/{additions,edits}"
|
|
|
|
|
stdout = { file = "outputs/git1_long_multiple.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lGd’ with file arguments shows a Git status column"
|
|
|
|
|
shell = "exa --git -lGd /testcases/git/**/* /testcases"
|
|
|
|
|
environment = { COLUMNS = "150" }
|
|
|
|
|
stdout = { file = "outputs/git1_paths_long_grid.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'grid', 'git', 'list-dirs' ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# The second Git repo: nested repositories and file ignoring
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column with ignored statuses"
|
|
|
|
|
shell = "exa --git -l /testcases/git2"
|
|
|
|
|
stdout = { file = "outputs/git2_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lR’ shows a Git status column in every table, handling ignored files and nested repositories"
|
|
|
|
|
shell = "exa --git -lR /testcases/git2"
|
|
|
|
|
stdout = { file = "outputs/git2_long_recurse.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lT’ shows a Git status column alongside the tree, handling ignored files and nested repositories"
|
|
|
|
|
shell = "exa --git -lT /testcases/git2"
|
|
|
|
|
stdout = { file = "outputs/git2_long_tree.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ with a directory argument shows ignored flags inside a directory"
|
|
|
|
|
shell = "exa --git -l /testcases/git2/ignoreds"
|
|
|
|
|
stdout = { file = "outputs/git2_long_ignorednested.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
2021-04-09 23:06:22 +00:00
|
|
|
|
name = "‘exa --git -l’ with an ignored directory argument flags the contents as ignored"
|
Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.
Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:
• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.
I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.
The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.
So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 19:39:44 +00:00
|
|
|
|
shell = "exa --git -l /testcases/git2/target"
|
|
|
|
|
stdout = { file = "outputs/git2_long_ignoreddir.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
2021-04-09 23:06:22 +00:00
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l --list-dirs’ with a directory argument doesn’t flag it as ignored if only the content is"
|
|
|
|
|
shell = "exa --git -l --list-dirs /testcases/git2/ignoreds/nested2"
|
|
|
|
|
stdout = { file = "outputs/git2_long_ignoredcontent.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.
Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:
• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.
I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.
The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.
So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 19:39:44 +00:00
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ with a nested repository argument uses the sub-repository rules"
|
|
|
|
|
shell = "exa --git -l /testcases/git2/deeply/nested/repository"
|
|
|
|
|
stdout = { file = "outputs/git2_long_nested.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ with multiple directory arguments still gets the flags correct"
|
|
|
|
|
shell = "exa --git -l /testcases/git2/{deeply,ignoreds,target}"
|
|
|
|
|
stdout = { file = "outputs/git2_long_multiple.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# The third Git repo: broken symlinks
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ handles broken symlinks in Git repositories"
|
|
|
|
|
shell = "exa --git -l /testcases/git3"
|
|
|
|
|
stdout = { file = "outputs/git3_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
|
2021-05-13 00:10:36 +00:00
|
|
|
|
|
|
|
|
|
# The forth Git repo: non UTF-8 file
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ handles non UTF8 file in Git repositories"
|
|
|
|
|
shell = "exa --git -l /testcases/git4"
|
|
|
|
|
stdout = { file = "outputs/git4_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
|
Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.
Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:
• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.
I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.
The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.
So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 19:39:44 +00:00
|
|
|
|
# Both repositories 1 and 2 at once
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column for multiple repositories"
|
|
|
|
|
shell = "exa --git -l /testcases/git /testcases/git2"
|
|
|
|
|
stdout = { file = "outputs/git1+2_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows a Git status column for multiple repositories across multiple directories"
|
|
|
|
|
shell = "exa --git -l /testcases/{git/additions,git2/deeply,git/edits,git2/deeply/nested}"
|
|
|
|
|
stdout = { file = "outputs/git1+2_long_directories.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
2021-04-09 23:06:22 +00:00
|
|
|
|
name = "‘exa --git -l’ shows a Git status column for multiple repositories across multiple directories 2"
|
Use Specsheet for the extended tests
This commit changes the way the extended test suite is run.
Previously, there was a folder full of outputs, and a script that ran exa repeatedly to check the outputs match. This script was hacked-together, with many problems:
• It stops at the first failure, so if one test fails, you have no idea how many actually failed.
• It also didn't actually show you the diff if one was different, it just checked it.
• It combined stdout and stderr, and didn't test the exit status of exa.
• All the output file names were just whatever I felt like calling the file at the time.
• There is no way to only run a few of the tests — you have to run the whole thing each time.
• There's no feel-good overall view where you see how many tests are passing.
I started writing Specsheet to solve this problem (amongst other problems), and now, three and a half years later, it's finally ready for prime time.
The tests are now defined as data rather than as a script. The outputs have a consistent naming convention (directory_flags.ansitxt), and they check stdout, stderr, and exit status separately. Specsheet also lets simple outputs (empty, non-empty, or one-line error messages) can be written inline rather than needing to be in files.
So even though this pretty much runs the same tests as the run.sh script did, the tests are now more organised, making it easy to see where tests are missing and functionality is not being tested.
2020-10-17 19:39:44 +00:00
|
|
|
|
shell = "exa --git -l /testcases/{git2/deeply/nested/directory,git/edits,git2/target,git2/deeply,git}"
|
|
|
|
|
stdout = { file = "outputs/git1+2_long_nested.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# No repository present
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -l’ shows an empty status for no repository"
|
|
|
|
|
shell = "exa --git -l /testcases/files"
|
|
|
|
|
stdout = { file = "outputs/files_long.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'long', 'git' ]
|
|
|
|
|
|
|
|
|
|
[[cmd]]
|
|
|
|
|
name = "‘exa --git -lG’ shows an empty status for no repository"
|
|
|
|
|
shell = "exa --git -lG /testcases/files"
|
|
|
|
|
environment = { COLUMNS = "40" }
|
|
|
|
|
stdout = { file = "outputs/files_long_grid_1col.ansitxt" }
|
|
|
|
|
stderr = { empty = true }
|
|
|
|
|
status = 0
|
|
|
|
|
tags = [ 'env', 'long', 'grid', 'git' ]
|