Add a test for --help

This commit is contained in:
Benjamin Sago 2017-06-23 21:22:48 +01:00
parent ded829f073
commit 8308638dd9
2 changed files with 46 additions and 0 deletions

44
xtests/help Normal file
View File

@ -0,0 +1,44 @@
Usage:
exa [options] [files...]
-?, --help show list of command-line options
-v, --version show version of exa
DISPLAY OPTIONS
-1, --oneline display one entry per line
-l, --long display extended file metadata as a table
-G, --grid display entries as a grid (default)
-x, --across sort the grid across, rather than downwards
-R, --recurse recurse into directories
-T, --tree recurse into directories as a tree
-F, --classify display type indicator by file names
--colo[u]r=WHEN when to use terminal colours (always, auto, never)
--colo[u]r-scale highlight levels of file sizes distinctly
FILTERING AND SORTING OPTIONS
-a, --all don't hide hidden and 'dot' files
-d, --list-dirs list directories like regular files
-r, --reverse reverse the sort order
-s, --sort SORT_FIELD which field to sort by:
--group-directories-first list directories before other files
-I, --ignore-glob GLOBS glob patterns (pipe-separated) of files to ignore
Valid sort fields: name, Name, extension, Extension, size,
modified, accessed, created, inode, none
LONG VIEW OPTIONS
-b, --binary list file sizes with binary prefixes
-B, --bytes list file sizes in bytes, without any prefixes
-g, --group list each file's group
-h, --header add a header row to each column
-H, --links list each file's number of hard links
-i, --inode list each file's inode number
-L, --level DEPTH limit the depth of recursion
-m, --modified use the modified timestamp field
-S, --blocks show number of file system blocks
-t, --time FIELD which timestamp field to list (modified, accessed, created)
-u, --accessed use the accessed timestamp field
-U, --created use the created timestamp field
--git list each file's Git status, if tracked
-@, --extended list each file's extended attributes and sizes

View File

@ -109,5 +109,7 @@ $exa $testcases/links/* -1 | diff -q - $results/links_1_files || exit 1
$exa $testcases/git/additions -l --git 2>&1 | diff -q - $results/git_additions || exit 1
$exa $testcases/git/edits -l --git 2>&1 | diff -q - $results/git_edits || exit 1
# And finally...
$exa --help 2>&1 | diff -q - $results/help || exit 1
echo "All the tests passed!"