rewrite checkpoint

This commit is contained in:
Cory Bennett
2017-08-13 18:23:38 -07:00
parent b00021ccbd
commit 36632a52f0
883 changed files with 222856 additions and 2972 deletions
+29
View File
@@ -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)
}
}