aboutsummaryrefslogtreecommitdiff
path: root/internal/nametransform/longnames_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/nametransform/longnames_test.go')
-rw-r--r--internal/nametransform/longnames_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/nametransform/longnames_test.go b/internal/nametransform/longnames_test.go
index 8fa19fe..4210492 100644
--- a/internal/nametransform/longnames_test.go
+++ b/internal/nametransform/longnames_test.go
@@ -20,3 +20,11 @@ func TestIsLongName(t *testing.T) {
t.Errorf("False positive")
}
}
+
+func TestRemoveLongNameSuffix(t *testing.T) {
+ filename := "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU=.name"
+ content := "gocryptfs.longname.LkwUdALvV_ANnzQN6ZZMYnxxfARD3IeZWCKnxGJjYmU="
+ if RemoveLongNameSuffix(filename) != content {
+ t.Error(".name suffix not removed")
+ }
+}