mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 12:31:06 +01:00
Improve ascii table, add --ofs flag, enhance documentation (#67)
* enhanced documentation * added --ofs parameter use 2 spaces for ascii output but it is customizable with --ofs, which is also being used by CSV mode (whose defaults remains unchanged) * improve ascii table output, use 2 spaces as OFS by default
This commit is contained in:
@@ -280,6 +280,11 @@ func TestPrinter(t *testing.T) {
|
||||
Numbering: testdata.numberize,
|
||||
UseColumns: testdata.usecol,
|
||||
NoColor: true,
|
||||
OFS: " ",
|
||||
}
|
||||
|
||||
if conf.OutputMode == cfg.CSV {
|
||||
conf.OFS = ","
|
||||
}
|
||||
|
||||
if testdata.column > 0 {
|
||||
@@ -304,8 +309,10 @@ func TestPrinter(t *testing.T) {
|
||||
|
||||
if got != exp {
|
||||
t.Errorf("not rendered correctly:\n+++ got:\n%s\n+++ want:\n%s",
|
||||
strings.ReplaceAll(got, " ", "_"),
|
||||
strings.ReplaceAll(exp, " ", "_"))
|
||||
got, exp,
|
||||
// strings.ReplaceAll(got, " ", "_"),
|
||||
// strings.ReplaceAll(exp, " ", "_")
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user