dynamo-browse/internal/common/ui/commandctrl/cmdpacks/pvars_test.go
Leon Mika c8b65f6b0a
All checks were successful
ci / Build (push) Successful in 3m40s
Added some quality of life changes
- Fixed the 'M' bind to mark all/none items, rather than toggle
- Fixed panic which was raised when reqesting @item with an index beyond the length of resultset
- Added changing the table when calling @table with a table or string name
2025-10-29 22:15:26 +11:00

33 lines
517 B
Go

package cmdpacks_test
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestPVars(t *testing.T) {
tests := []struct {
descr string
cmd string
}{
{
descr: "returns item on empty result set",
cmd: `
ui:query '"a"="1"' -table service-test-data
@item
`,
},
}
for _, tt := range tests {
t.Run(tt.descr, func(t *testing.T) {
svc := newService(t)
ctx := t.Context()
_, err := svc.CommandController.ExecuteAndWait(ctx, tt.cmd)
assert.NoError(t, err)
})
}
}