MCPcopy Index your code
hub / github.com/codegangsta/gin / Test_Runner_Kill

Function Test_Runner_Kill

lib/runner_test.go:42–69  ·  view source on GitHub ↗

func Test_Runner_SettingEnvironment(t *testing.T) { }

(t *testing.T)

Source from the content-addressed store, hash-verified

40// }
41
42func Test_Runner_Kill(t *testing.T) {
43 bin := filepath.Join("test_fixtures", "writing_output")
44 if runtime.GOOS == "windows" {
45 bin += ".bat"
46 }
47
48 runner := gin.NewRunner(bin)
49
50 cmd1, err := runner.Run()
51 expect(t, err, nil)
52
53 _, err = runner.Run()
54 expect(t, err, nil)
55
56 time.Sleep(time.Second * 1)
57 os.Chtimes(bin, time.Now(), time.Now())
58 if err != nil {
59 t.Fatal("Error with Chtimes")
60 }
61
62 cmd3, err := runner.Run()
63 expect(t, err, nil)
64
65 if runtime.GOOS != "windows" {
66 // does not seem to work as expected on windows
67 refute(t, cmd1, cmd3)
68 }
69}
70
71func Test_Runner_SetWriter(t *testing.T) {
72 buff := bytes.NewBufferString("")

Callers

nothing calls this directly

Calls 3

RunMethod · 0.95
expectFunction · 0.85
refuteFunction · 0.85

Tested by

no test coverage detected