(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestShellThumbnailMultilineScript(t *testing.T) { |
| 10 | script := "printf first\nprintf second" |
| 11 | handler, e := newShellThumbnailTypeHandler(types.SM{ |
| 12 | "shell": script, |
| 13 | "mime-type": "image/jpeg", |
| 14 | }) |
| 15 | if e != nil { |
| 16 | t.Fatal(e) |
| 17 | } |
| 18 | shellHandler := handler.(*shellThumbnailTypeHandler) |
| 19 | wantCommand, wantArgs := platformShellCommand("linux", script) |
| 20 | if shellHandler.command != wantCommand { |
| 21 | t.Skip("test assertions target the Unix test environment") |
| 22 | } |
| 23 | if !reflect.DeepEqual(shellHandler.args, wantArgs) { |
| 24 | t.Fatalf("unexpected arguments: %#v", shellHandler.args) |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | func TestPlatformShellCommand(t *testing.T) { |
| 29 | tests := []struct { |
nothing calls this directly
no test coverage detected