From c8ed69368e7e0b54986c898be1ef153b2fff75a0 Mon Sep 17 00:00:00 2001 From: whonore Date: Fri, 23 Oct 2020 15:08:12 -0400 Subject: [PATCH] Add tests --- .../exts_grid_sort_name_reverse.ansitxt | 6 +++++ .../exts_oneline_sort_name_reverse.ansitxt | 26 +++++++++++++++++++ xtests/sorting.toml | 19 ++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 xtests/outputs/exts_grid_sort_name_reverse.ansitxt create mode 100644 xtests/outputs/exts_oneline_sort_name_reverse.ansitxt diff --git a/xtests/outputs/exts_grid_sort_name_reverse.ansitxt b/xtests/outputs/exts_grid_sort_name_reverse.ansitxt new file mode 100644 index 0000000..cb8b9a7 --- /dev/null +++ b/xtests/outputs/exts_grid_sort_name_reverse.ansitxt @@ -0,0 +1,6 @@ +video.wmv lossless.flac crypto.signature compressed.tar.gz backup~ +VIDEO.AVI image.svg crypto.asc compressed.deb #SAVEFILE# +MUSIC.OGG IMAGE.PNG COMPRESSED.ZIP compiled.o +music.mp3 file.tmp compressed.txz compiled.js +Makefile DOCUMENT.XLSX compressed.tgz compiled.coffee +lossless.wav document.pdf compressed.tar.xz compiled.class diff --git a/xtests/outputs/exts_oneline_sort_name_reverse.ansitxt b/xtests/outputs/exts_oneline_sort_name_reverse.ansitxt new file mode 100644 index 0000000..2143261 --- /dev/null +++ b/xtests/outputs/exts_oneline_sort_name_reverse.ansitxt @@ -0,0 +1,26 @@ +video.wmv +VIDEO.AVI +MUSIC.OGG +music.mp3 +Makefile +lossless.wav +lossless.flac +image.svg +IMAGE.PNG +file.tmp +DOCUMENT.XLSX +document.pdf +crypto.signature +crypto.asc +COMPRESSED.ZIP +compressed.txz +compressed.tgz +compressed.tar.xz +compressed.tar.gz +compressed.deb +compiled.o +compiled.js +compiled.coffee +compiled.class +backup~ +#SAVEFILE# diff --git a/xtests/sorting.toml b/xtests/sorting.toml index f25d798..e8d9a59 100644 --- a/xtests/sorting.toml +++ b/xtests/sorting.toml @@ -136,3 +136,22 @@ stdout = { string = "plum\npear\npeach" } stderr = { empty = true } status = 0 tags = [ 'oneline', 'sort', 'dates' ] + +# sorting with arguments specified + +[[cmd]] +name = "‘exa -Gr --sort=name *’ sorts by file name in reverse order" +shell = "exa -Gr --sort=name /testcases/file-names-exts/*" +environment = { COLUMNS = "80" } +stdout = { file = "outputs/exts_grid_sort_name_reverse.ansitxt" } +stderr = { empty = true } +status = 0 +tags = [ 'grid', 'sort', 'reverse' ] + +[[cmd]] +name = "‘exa -1r --sort=name *’ sorts by file name in reverse order" +shell = "exa -1r --sort=name /testcases/file-name-exts/*" +stdout = { file = "outputs/exts_oneline_sort_name_reverse.ansitxt" } +stderr = { empty = true } +status = 0 +tags = [ 'oneline', 'sort', 'reverse' ]