MCPcopy Index your code
hub / github.com/go-task/task / TestPromptAssumeYes

Function TestPromptAssumeYes

executor_test.go:890–914  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

888}
889
890func TestPromptAssumeYes(t *testing.T) {
891 t.Parallel()
892
893 NewExecutorTest(t,
894 WithName("--yes flag should skip prompt"),
895 WithExecutorOptions(
896 task.WithDir("testdata/prompt"),
897 task.WithAssumeTerm(true),
898 task.WithAssumeYes(true),
899 ),
900 WithTask("foo"),
901 WithInput("\n"),
902 )
903
904 NewExecutorTest(t,
905 WithName("task should raise errors.TaskCancelledError"),
906 WithExecutorOptions(
907 task.WithDir("testdata/prompt"),
908 task.WithAssumeTerm(true),
909 ),
910 WithTask("foo"),
911 WithInput("\n"),
912 WithRunError(),
913 )
914}
915
916func TestForCmds(t *testing.T) {
917 t.Parallel()

Callers

nothing calls this directly

Calls 6

NewExecutorTestFunction · 0.85
WithNameFunction · 0.85
WithExecutorOptionsFunction · 0.85
WithTaskFunction · 0.85
WithInputFunction · 0.85
WithRunErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…