diff options
author | bep <[email protected]> | 2015-03-06 14:56:44 +0100 |
---|---|---|
committer | bep <[email protected]> | 2015-03-06 15:25:19 +0100 |
commit | 103ea842f820492b88af370e248613c051c96eac (patch) | |
tree | c0e59bee85f61f4f498ef2dbcc6bdf9dfe5f9715 /helpers/path_test.go | |
parent | c4c19ad303cb11616a7291bdbeec997e59b6d24e (diff) | |
download | hugo-103ea842f820492b88af370e248613c051c96eac.tar.gz hugo-103ea842f820492b88af370e248613c051c96eac.zip |
Fix errors reported by Go Vet
Diffstat (limited to 'helpers/path_test.go')
-rw-r--r-- | helpers/path_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/helpers/path_test.go b/helpers/path_test.go index 9be1c9fc4..66fe5457f 100644 --- a/helpers/path_test.go +++ b/helpers/path_test.go @@ -107,7 +107,7 @@ func TestMakePathRelative(t *testing.T) { _, error := MakePathRelative("a/b/c.ss", "/a/c", "/d/c", "/e/f") if error == nil { - t.Errorf("Test #%d failed. Expected error") + t.Errorf("Test failed, expected error") } } @@ -497,7 +497,7 @@ func TestFileAndExt(t *testing.T) { t.Errorf("Test %d failed. Expected filename %q got %q.", i, d.expectedFile, file) } if d.expectedExt != ext { - t.Errorf("Test %d failed. Expected extension $q got %q.", i, d.expectedExt, ext) + t.Errorf("Test %d failed. Expected extension %q got %q.", i, d.expectedExt, ext) } } @@ -564,7 +564,7 @@ func TestFindCWD(t *testing.T) { t.Errorf("Test %d failed. Expected %q but got %q", i, d.expectedDir, dir) } if d.expectedErr != err { - t.Error("Test %d failed. Expected %q but got %q", i, d.expectedErr, err) + t.Errorf("Test %d failed. Expected %q but got %q", i, d.expectedErr, err) } } } @@ -639,7 +639,7 @@ func TestWriteToDisk(t *testing.T) { } contents, e := ioutil.ReadFile(d.filename) if e != nil { - t.Error("Test %d failed. Could not read file %s. Reason: %s\n", i, d.filename, e) + t.Errorf("Test %d failed. Could not read file %s. Reason: %s\n", i, d.filename, e) } if randomString != string(contents) { t.Errorf("Test %d failed. Expected contents %q but got %q", i, randomString, string(contents)) |