mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 21:57:59 +02:00
encoder/filename: Wrap scsu package
This commit is contained in:
committed by
Nick Craig-Wood
parent
f14220ef1e
commit
5ca7f1fe87
@ -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
|
||||
|
Reference in New Issue
Block a user