mirror of
https://github.com/Threnklyn/jira.git
synced 2026-06-05 20:48:28 +02:00
rewrite checkpoint
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
package shellquote
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"testing"
|
||||
"testing/quick"
|
||||
)
|
||||
|
||||
// this is called bothtest because it tests Split and Join together
|
||||
|
||||
func TestJoinSplit(t *testing.T) {
|
||||
f := func(strs []string) bool {
|
||||
// Join, then split, the input
|
||||
combined := Join(strs...)
|
||||
split, err := Split(combined)
|
||||
if err != nil {
|
||||
t.Logf("Error splitting %#v: %v", combined, err)
|
||||
return false
|
||||
}
|
||||
if !reflect.DeepEqual(strs, split) {
|
||||
t.Logf("Input %q did not match output %q", strs, split)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
if err := quick.Check(f, nil); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user