diff options
Diffstat (limited to 'executil/executil_test.go')
-rw-r--r-- | executil/executil_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/executil/executil_test.go b/executil/executil_test.go index f2633ab..d3c01f2 100644 --- a/executil/executil_test.go +++ b/executil/executil_test.go @@ -2,16 +2,18 @@ package executil import ( "os" + "path/filepath" "strings" "testing" ) func TestCompileCommand(t *testing.T) { tmpl := "tar -xf {{.Name}} {{.Base}} {{.Dir}}" + dir := t.TempDir() data := CommandData{ - Name: "/foo/bar/baz.rar", + Name: filepath.Join(dir, "baz.rar"), Base: "baz.rar", - Dir: "/foo/bar", + Dir: dir, } cmd, err := compileCommand(tmpl, data) if err != nil { |