helpers: Fix misspells

This commit is contained in:
bogem 2017-02-02 22:25:42 +01:00 committed by digitalcraftsman
parent 2af2ff3c1f
commit faba90ab96
2 changed files with 6 additions and 6 deletions

View file

@ -277,7 +277,7 @@ func TestReplaceExtension(t *testing.T) {
input, newext, expected string input, newext, expected string
} }
data := []test{ data := []test{
// These work according to the above defination // These work according to the above definition
{"/some/random/path/file.xml", "html", "file.html"}, {"/some/random/path/file.xml", "html", "file.html"},
{"/banana.html", "xml", "banana.xml"}, {"/banana.html", "xml", "banana.xml"},
{"./banana.html", "xml", "banana.xml"}, {"./banana.html", "xml", "banana.xml"},
@ -361,7 +361,7 @@ func TestIsEmpty(t *testing.T) {
nonEmptyNonZeroLengthFilesDirectory, _ := createTempDirWithNonZeroLengthFiles() nonEmptyNonZeroLengthFilesDirectory, _ := createTempDirWithNonZeroLengthFiles()
defer deleteTempDir(nonEmptyNonZeroLengthFilesDirectory) defer deleteTempDir(nonEmptyNonZeroLengthFilesDirectory)
nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt" nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt"
nonExistentDir := os.TempDir() + "/this/direcotry/does/not/exist/" nonExistentDir := os.TempDir() + "/this/directory/does/not/exist/"
fileDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentFile) fileDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentFile)
dirDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentDir) dirDoesNotExist := fmt.Errorf("%q path does not exist", nonExistentDir)
@ -502,7 +502,7 @@ func TestExists(t *testing.T) {
emptyDirectory, _ := createEmptyTempDir() emptyDirectory, _ := createEmptyTempDir()
defer deleteTempDir(emptyDirectory) defer deleteTempDir(emptyDirectory)
nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt" nonExistentFile := os.TempDir() + "/this-file-does-not-exist.txt"
nonExistentDir := os.TempDir() + "/this/direcotry/does/not/exist/" nonExistentDir := os.TempDir() + "/this/directory/does/not/exist/"
type test struct { type test struct {
input string input string
@ -596,7 +596,7 @@ func TestFilename(t *testing.T) {
{"./filename-no-ext", "filename-no-ext"}, {"./filename-no-ext", "filename-no-ext"},
{"/filename-no-ext", "filename-no-ext"}, {"/filename-no-ext", "filename-no-ext"},
{"filename-no-ext", "filename-no-ext"}, {"filename-no-ext", "filename-no-ext"},
{"directoy/", ""}, // no filename case?? {"directory/", ""}, // no filename case??
{"directory/.hidden.ext", ".hidden"}, {"directory/.hidden.ext", ".hidden"},
{"./directory/../~/banana/gold.fish", "gold"}, {"./directory/../~/banana/gold.fish", "gold"},
{"../directory/banana.man", "banana"}, {"../directory/banana.man", "banana"},
@ -625,7 +625,7 @@ func TestFileAndExt(t *testing.T) {
{"./filename-no-ext", "filename-no-ext", ""}, {"./filename-no-ext", "filename-no-ext", ""},
{"/filename-no-ext", "filename-no-ext", ""}, {"/filename-no-ext", "filename-no-ext", ""},
{"filename-no-ext", "filename-no-ext", ""}, {"filename-no-ext", "filename-no-ext", ""},
{"directoy/", "", ""}, // no filename case?? {"directory/", "", ""}, // no filename case??
{"directory/.hidden.ext", ".hidden", ".ext"}, {"directory/.hidden.ext", ".hidden", ".ext"},
{"./directory/../~/banana/gold.fish", "gold", ".fish"}, {"./directory/../~/banana/gold.fish", "gold", ".fish"},
{"../directory/banana.man", "banana", ".man"}, {"../directory/banana.man", "banana", ".man"},

View file

@ -19,7 +19,7 @@ type PageCollections struct {
Pages Pages Pages Pages
// Includes all pages in all languages, including the current one. // Includes all pages in all languages, including the current one.
// Inlcudes pages of all types. // Includes pages of all types.
AllPages Pages AllPages Pages
// A convenience cache for the traditional index types, taxonomies, home page etc. // A convenience cache for the traditional index types, taxonomies, home page etc.