Created
August 9, 2018 16:42
Star
You must be signed in to star a gist
Adding tests..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
morgo@ryzen:~/go/src/github.com/pingcap/tidb$ git diff | |
diff --git a/util/charset/charset_test.go b/util/charset/charset_test.go | |
index c400d97f..931b78ac 100644 | |
--- a/util/charset/charset_test.go | |
+++ b/util/charset/charset_test.go | |
@@ -17,6 +17,8 @@ import ( | |
"testing" | |
. "github.com/pingcap/check" | |
+ "github.com/pingcap/tidb/store/mockstore" | |
+ "github.com/pingcap/tidb/util/testkit" | |
"github.com/pingcap/tidb/util/testleak" | |
) | |
@@ -28,6 +30,7 @@ func TestT(t *testing.T) { | |
var _ = Suite(&testCharsetSuite{}) | |
type testCharsetSuite struct { | |
+ store kv.Storage | |
} | |
func testValidCharset(c *C, charset string, collation string, expect bool) { | |
@@ -92,3 +95,10 @@ func (s *testCharsetSuite) TestGetDefaultCollation(c *C) { | |
testGetDefaultCollation(c, tt.cs, tt.co, tt.succ) | |
} | |
} | |
+ | |
+func (s *testCharsetSuite) TestConvertCharsetSQL(c *C) { | |
+ | |
+ tk := testkit.NewTestKit(c, s.store) | |
+ tk.MustExec("SELECT CONVERT( CONVERT( 'xxx' USING ascii ) USING utf8mb4 ) AS xxx") | |
+ | |
+} | |
morgo@ryzen:~/go/src/github.com/pingcap/tidb$ make dev | |
.. | |
.. | |
# github.com/pingcap/tidb/util/charset | |
import cycle not allowed in test | |
package github.com/pingcap/tidb/util/charset (test) | |
imports github.com/pingcap/tidb/store/mockstore | |
imports github.com/pingcap/tidb/store/mockstore/mocktikv | |
imports github.com/pingcap/tidb/ast | |
imports github.com/pingcap/tidb/model | |
imports github.com/pingcap/tidb/types | |
imports github.com/pingcap/tidb/util/charset | |
FAIL github.com/pingcap/tidb/util/charset [setup failed] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment