mirror of
https://github.com/restic/restic.git
synced 2026-11-29 15:29:47 +00:00
Fix typos
This commit is contained in:
1 parent
a72b418319
commit
ac00229386
23 files changed
+56
-56
No files matched your search
@@ -44,7 +44,7 @@ type OverwriteBehavior int
|
||||
const (
|
||||
OverwriteAlways OverwriteBehavior = iota
|
||||
// OverwriteIfChanged is like OverwriteAlways except that it skips restoring the content
|
||||
// of files with matching size&mtime. Metatdata is always restored.
|
||||
// of files with matching size&mtime. Metadata is always restored.
|
||||
OverwriteIfChanged
|
||||
OverwriteIfNewer
|
||||
OverwriteNever
|
||||
|
||||
@@ -1162,7 +1162,7 @@ func TestRestoreIfChanged(t *testing.T) {
|
||||
rtest.Equals(t, origData, string(data), "expected original file content")
|
||||
} else {
|
||||
// restore should not have noticed the changed file content
|
||||
rtest.Equals(t, modData, string(data), "expeced modified file content")
|
||||
rtest.Equals(t, modData, string(data), "expected modified file content")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
restoreui "github.com/restic/restic/internal/ui/restore"
|
||||
)
|
||||
|
||||
func TestRestorerRestoreEmptyHardlinkedFileds(t *testing.T) {
|
||||
func TestRestorerRestoreEmptyHardlinkedFields(t *testing.T) {
|
||||
repo := repository.TestRepository(t)
|
||||
|
||||
sn, _ := saveSnapshot(t, repo, Snapshot{
|
||||
|
||||
@@ -356,29 +356,29 @@ func verifyFileAttributes(t *testing.T, mainFilePath string, attr FileAttributes
|
||||
rtest.OK(t, err)
|
||||
//Test positive and negative scenarios
|
||||
if attr.ReadOnly {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_READONLY != 0, "Expected read only attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_READONLY != 0, "Expected read only attribute.")
|
||||
} else {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_READONLY == 0, "Unexpected read only attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_READONLY == 0, "Unexpected read only attribute.")
|
||||
}
|
||||
if attr.Hidden {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_HIDDEN != 0, "Expected hidden attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_HIDDEN != 0, "Expected hidden attribute.")
|
||||
} else {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_HIDDEN == 0, "Unexpected hidden attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_HIDDEN == 0, "Unexpected hidden attribute.")
|
||||
}
|
||||
if attr.System {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_SYSTEM != 0, "Expected system attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_SYSTEM != 0, "Expected system attribute.")
|
||||
} else {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_SYSTEM == 0, "Unexpected system attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_SYSTEM == 0, "Unexpected system attribute.")
|
||||
}
|
||||
if attr.Archive {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ARCHIVE != 0, "Expected archive attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ARCHIVE != 0, "Expected archive attribute.")
|
||||
} else {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ARCHIVE == 0, "Unexpected archive attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ARCHIVE == 0, "Unexpected archive attribute.")
|
||||
}
|
||||
if attr.Encrypted {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ENCRYPTED != 0, "Expected encrypted attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ENCRYPTED != 0, "Expected encrypted attribute.")
|
||||
} else {
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ENCRYPTED == 0, "Unexpected encrypted attibute.")
|
||||
rtest.Assert(t, fileAttributes&windows.FILE_ATTRIBUTE_ENCRYPTED == 0, "Unexpected encrypted attribute.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user