mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-17 12:31:06 +01:00
add support for negative filters (-F field!=regex)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright © 2024 Thomas von Dein
|
||||
Copyright © 2024-2025 Thomas von Dein
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -98,6 +98,20 @@ func TestFilterByFields(t *testing.T) {
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "one-field-negative",
|
||||
filter: []string{"one!=asd"},
|
||||
expect: Tabdata{
|
||||
headers: []string{
|
||||
"ONE", "TWO", "THREE",
|
||||
},
|
||||
entries: [][]string{
|
||||
{"19191", "EDD 1", "x"},
|
||||
{"8d8", "AN 1", "y"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
name: "one-field-inverted",
|
||||
filter: []string{"one=19"},
|
||||
|
||||
Reference in New Issue
Block a user