sq/cli/cmd_src_test.go
Neil O'Toole db55986980
#307: Ingest cache (#354)
- Support for ingest cache, download cache, and progress bars.
2024-01-14 18:45:34 -07:00

30 lines
562 B
Go

package cli_test
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"github.com/neilotoole/sq/cli/testrun"
"github.com/neilotoole/sq/testh"
"github.com/neilotoole/sq/testh/sakila"
)
func TestCmdSrc(t *testing.T) {
ctx := context.Background()
th := testh.New(t)
tr := testrun.New(ctx, t, nil).Add()
err := tr.Exec("src")
require.NoError(t, err)
tr.Reset().Add(*th.Source(sakila.CSVActor))
err = tr.Exec("src")
require.NoError(t, err)
err = tr.Reset().Exec(".data | .[0:5]")
require.NoError(t, err)
t.Log(tr.Out.String())
}