mirror of
https://github.com/hslam/ftok.git
synced 2025-04-25 13:48:57 +08:00
add ftok test
This commit is contained in:
parent
e0caad44eb
commit
e1b183ded2
29
ftok_test.go
Normal file
29
ftok_test.go
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright (c) 2020 Meng Huang (mhboy@outlook.com)
|
||||
// This package is licensed under a MIT license that can be found in the LICENSE file.
|
||||
|
||||
package ftok
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestFtok(t *testing.T) {
|
||||
key, err := Ftok("/tmp", 0x22)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
key1, err := Ftok("/tmp", 0x22)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if key != key1 && key <= 0 {
|
||||
t.Error(key, key1)
|
||||
}
|
||||
}
|
||||
|
||||
func TestStat(t *testing.T) {
|
||||
_, err := Ftok("/tmp/hslam", 0x22)
|
||||
if err == nil {
|
||||
t.Error()
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user