encoder/filename: Wrap scsu package
This commit is contained in:
parent
f14220ef1e
commit
5ca7f1fe87
5 changed files with 37 additions and 6 deletions
|
@ -1,6 +1,9 @@
|
|||
package filename
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
tests := []struct {
|
||||
|
@ -117,6 +120,10 @@ func TestDecode(t *testing.T) {
|
|||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := Decode(tt.encoded)
|
||||
if (err != nil) != tt.wantErr {
|
||||
if err != nil && err.Error() == scsuNotEnabled && runtime.Version() < "go1.13" {
|
||||
t.Skip(err.Error())
|
||||
return
|
||||
}
|
||||
if tt.encoded == "" && tt.want != "" {
|
||||
proposed := Encode(tt.want)
|
||||
table := decodeMap[proposed[0]] - 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue