exa/xtests/grid-details-view.toml
ariasuni 0f414cf0b9 Don’t produce extra column sometimes with long grid + header
The number of necessary columns was computed by producing a grid in different sizes and see if all columns were used. However, if there was two files and we tried to fit them in a 3-column grid, it would produces three headers and all three columns would be used; when trying a 4-column grid, the two supplementary headers would fill the third column and the fourth would be empty; so 3 columns would be used.

Now, when the grid fits into the terminal and the number of columns is exactly the number of files to display, it returns immediately instead of trying bigger grids.

Fixes GH-436.
2021-01-12 20:18:19 +01:00

100 lines
3.2 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# listing directory tests
[[cmd]]
name = "COLUMNS=40 exa -lG produces a grid with details of 1 column"
shell = "exa -lG /testcases/files"
environment = { COLUMNS = "40" }
stdout = { file = "outputs/files_long_grid_1col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=80 exa -lG produces a grid with details of 1 column"
shell = "exa -lG /testcases/files"
environment = { COLUMNS = "80" }
stdout = { file = "outputs/files_long_grid_1col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=120 exa -lG produces a grid with details of 2 columns"
shell = "exa -lG /testcases/files"
environment = { COLUMNS = "120" }
stdout = { file = "outputs/files_long_grid_2col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=160 exa -lG produces a grid with details of 3 columns"
shell = "exa -lG /testcases/files"
environment = { COLUMNS = "160" }
stdout = { file = "outputs/files_long_grid_3col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=200 exa -lG produces a grid with details of 4 columns"
shell = "exa -lG /testcases/files"
environment = { COLUMNS = "200" }
stdout = { file = "outputs/files_long_grid_4col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
# listing files tests
# (these rely on bashs glob sort order)
# (some of the output files also have trailing whitespace)
[[cmd]]
name = "COLUMNS=100 exa -lG with file arguments produces a grid with details of 1 column, with full paths"
shell = "exa -lG /testcases/files/*"
environment = { COLUMNS = "100" }
stdout = { file = "outputs/files_paths_long_grid_1col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=150 exa -lG with file arguments produces a grid with details of 2 columns, with full paths"
shell = "exa -lG /testcases/files/*"
environment = { COLUMNS = "150" }
stdout = { file = "outputs/files_paths_long_grid_2col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMNS=200 exa -lG with file arguments produces a grid with details of 3 columns, with full paths"
shell = "exa -lG /testcases/files/*"
environment = { COLUMNS = "200" }
stdout = { file = "outputs/files_paths_long_grid_3col.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
# check if exa is using the minimum number of columns with headers
[[cmd]]
name = "COLUMN=200 exa -lGh with one file dont produce extra columns even if there place for more"
shell = "exa -lGh /testcases/files/10_bytes"
environment = { COLUMNS = "200" }
stdout = { file = "outputs/files_paths_long_grid_header_1file.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]
[[cmd]]
name = "COLUMN=200 exa -lGh with several files dont produce extra columns even if there place for more"
shell = "exa -lGh /testcases/files/10_{bytes,KiB}"
environment = { COLUMNS = "200" }
stdout = { file = "outputs/files_paths_long_grid_header_2files.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'long', 'grid' ]