diff options
Diffstat (limited to 'cryptfs/config_test.go')
-rw-r--r-- | cryptfs/config_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cryptfs/config_test.go b/cryptfs/config_test.go index cd8ed2f..e052428 100644 --- a/cryptfs/config_test.go +++ b/cryptfs/config_test.go @@ -69,3 +69,16 @@ func TestCreateConfFile(t *testing.T) { } } + +func TestIsFeatureFlagKnown(t *testing.T) { + var cf ConfFile + if !cf.isFeatureFlagKnown(FlagDirIV) { + t.Errorf("This flag should be known") + } + if !cf.isFeatureFlagKnown(FlagPlaintextNames) { + t.Errorf("This flag should be known") + } + if cf.isFeatureFlagKnown("StrangeFeatureFlag") { + t.Errorf("This flag should be NOT known") + } +} |