Add signature tests, fix tests
This commit is contained in:
parent
4081e693fc
commit
b42e382224
8 changed files with 121 additions and 27 deletions
|
|
@ -2,14 +2,18 @@ package crypto
|
|||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var err error
|
||||
|
||||
func readTestFile(name string) string {
|
||||
func readTestFile(name string, trimNewlines bool) string {
|
||||
data, err := ioutil.ReadFile("testdata/" + name)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if trimNewlines {
|
||||
return strings.TrimRight(string(data), "\n")
|
||||
}
|
||||
return string(data)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue