2015-07-20 19:18:25 +00:00
|
|
|
package cli
|
2013-07-20 22:50:13 +00:00
|
|
|
|
|
|
|
import (
|
2016-04-28 20:05:14 +00:00
|
|
|
"os"
|
2013-07-20 22:50:13 +00:00
|
|
|
"reflect"
|
|
|
|
"testing"
|
|
|
|
)
|
|
|
|
|
2016-05-25 16:05:14 +00:00
|
|
|
func init() {
|
2019-09-15 09:22:46 +00:00
|
|
|
_ = os.Setenv("CLI_TEMPLATE_REPANIC", "1")
|
2016-05-25 16:05:14 +00:00
|
|
|
}
|
|
|
|
|
2013-07-20 22:50:13 +00:00
|
|
|
func expect(t *testing.T, a interface{}, b interface{}) {
|
2021-03-07 03:36:56 +00:00
|
|
|
t.Helper()
|
2016-04-28 20:05:14 +00:00
|
|
|
|
2015-10-27 04:45:28 +00:00
|
|
|
if !reflect.DeepEqual(a, b) {
|
2021-03-07 03:36:56 +00:00
|
|
|
t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a))
|
2013-07-20 22:50:13 +00:00
|
|
|
}
|
|
|
|
}
|