(t *testing.T)
| 109 | } |
| 110 | |
| 111 | func TestLearnListPathSelector(t *testing.T) { |
| 112 | wb := SetupWorkbench(t) |
| 113 | defer wb.Close() |
| 114 | |
| 115 | shellPid := wb.LaunchFakeShell() |
| 116 | |
| 117 | wb.RunCodCmd("init", strconv.Itoa(shellPid), "bash") |
| 118 | |
| 119 | wb.RunCodCmd("learn", "--", "binaries/cat.py", "--help") |
| 120 | wb.RunCodCmd("learn", "--", "binaries/naval-fate.py", "--help") |
| 121 | |
| 122 | abs, err := filepath.Abs("binaries/naval-fate.py") |
| 123 | require.Nil(t, err) |
| 124 | |
| 125 | out := wb.RunCodCmd("list", abs) |
| 126 | |
| 127 | commands := wb.ParseCodListCommands(out) |
| 128 | |
| 129 | require.Equal(t, |
| 130 | []string{ |
| 131 | "binaries/naval-fate.py --help", |
| 132 | }, |
| 133 | commands, |
| 134 | ) |
| 135 | } |
| 136 | |
| 137 | func TestLearnListIdSelector(t *testing.T) { |
| 138 | wb := SetupWorkbench(t) |
nothing calls this directly
no test coverage detected