INNER CODE UNIT · Go

start

xo/usql · cli_test.go:254

			start = i + 1
		}
	}
	return append(out, s[start:])
}

// TestCLIRecordsSomething checks that the harness itself works, so that an
// empty recording cannot pass every golden comparison quietly.
func TestCLIRecordsSomething(t *testing.T) {
	if runtime.GOOS != "linux" && runtime.GOOS != "darwin" {
		t.Skipf("recording a terminal session needs a pseudo-terminal, which %s does not provide", runtime.GOOS)
	}
	tr, err := capture.Record(context.Background(), usqlPath, capture.Session{
		Name:  "smoke",
		Args:  []string{"--pset=pager=off", "sqlite3://:memory:"},
		Steps: []capture.Step{{Send: `\q` + capture.KeyEnter, Wait: 2 * time.Second}},
	})
	if err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…