(t *testing.T)
| 112 | } |
| 113 | |
| 114 | func TestUpdateBroken(t *testing.T) { |
| 115 | wb := SetupWorkbench(t) |
| 116 | defer wb.Close() |
| 117 | |
| 118 | shellPid := strconv.Itoa(wb.LaunchFakeShell()) |
| 119 | |
| 120 | wb.RunCodCmd("init", shellPid, "bash") |
| 121 | |
| 122 | tmpCat := wb.InTmpDataPath("cat1") |
| 123 | wb.CopyFile("binaries/cat.py", tmpCat) |
| 124 | wb.RunCodCmd("learn", "--", tmpCat, "--help") |
| 125 | out := wb.RunCodCmd("list") |
| 126 | parsed := wb.ParseCodListMap(out) |
| 127 | require.Equal(t, len(parsed), 1) |
| 128 | |
| 129 | err := os.Remove(tmpCat) |
| 130 | require.Nil(t, err) |
| 131 | |
| 132 | wb.RunCodCmd("update", "**") |
| 133 | |
| 134 | out = wb.RunCodCmd("list") |
| 135 | parsed = wb.ParseCodListMap(out) |
| 136 | require.Equal(t, make(map[int]string), parsed) |
| 137 | } |
nothing calls this directly
no test coverage detected