Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
Signed-off-by: Rohit Bhagat <[email protected]>
  • Loading branch information
Rohit Bhagat committed Dec 26, 2023
1 parent 94aaefd commit 285425b
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/JDBC/expected/BABEL-4638-vu-cleanup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP TABLE babel_4638_t1
DROP TABLE babel_4638_t2
DROP TABLE babel_4638_t3
DROP TABLE babel_4638_t4
GO
19 changes: 19 additions & 0 deletions test/JDBC/expected/BABEL-4638-vu-prepare.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CREATE TABLE babel_4638_t1(a VARCHAR(10) COLLATE arabic_ci_as);
CREATE TABLE babel_4638_t2(a VARCHAR(10) COLLATE chinese_prc_ci_as);
CREATE TABLE babel_4638_t3(a VARCHAR(10) COLLATE japanese_ci_as);
CREATE TABLE babel_4638_t4(a VARCHAR(10) COLLATE hebrew_ci_as);
GO

INSERT INTO babel_4638_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل');
INSERT INTO babel_4638_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚');
INSERT INTO babel_4638_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ');
INSERT INTO babel_4638_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ');
GO
~~ROW COUNT: 4~~

~~ROW COUNT: 4~~

~~ROW COUNT: 4~~

~~ROW COUNT: 4~~

135 changes: 135 additions & 0 deletions test/JDBC/expected/BABEL-4638-vu-verify.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
-- arabic_ci_as
SELECT * FROM babel_4638_t1
GO
~~START~~
varchar
ح
غ
سسس
للل
~~END~~


SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t1
GO
~~START~~
text
ح|
غ|
س|
ل|
~~END~~


SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t1
GO
~~START~~
text
ح |
غ |
سسس |
للل |
~~END~~


-- chinese_prc_ci_as
SELECT * FROM babel_4638_t2
GO
~~START~~
varchar
乙乙乙
魚魚魚
~~END~~


SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t2
GO
~~START~~
text
|
|
|
|
~~END~~


SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t2
GO
~~START~~
text
五 |
九 |
乙乙 |
魚魚 |
~~END~~


-- japanese_ci_as
SELECT * FROM babel_4638_t3
GO
~~START~~
varchar
ちちち
さささ
~~END~~


SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t3
GO
~~START~~
text
|
|
|
|
~~END~~


SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t3
GO
~~START~~
text
あ |
九 |
ちち |
ささ |
~~END~~


-- hebrew_ci_as
SELECT * FROM babel_4638_t4
GO
~~START~~
varchar
ב
א
קקק
מממ
~~END~~


SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t4
GO
~~START~~
text
ב|
א|
ק|
מ|
~~END~~


SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t4
GO
~~START~~
text
ב |
א |
קקק |
מממ |
~~END~~

5 changes: 5 additions & 0 deletions test/JDBC/input/BABEL-4638-vu-cleanup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP TABLE babel_4638_t1
DROP TABLE babel_4638_t2
DROP TABLE babel_4638_t3
DROP TABLE babel_4638_t4
GO
11 changes: 11 additions & 0 deletions test/JDBC/input/BABEL-4638-vu-prepare.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CREATE TABLE babel_4638_t1(a VARCHAR(10) COLLATE arabic_ci_as);
CREATE TABLE babel_4638_t2(a VARCHAR(10) COLLATE chinese_prc_ci_as);
CREATE TABLE babel_4638_t3(a VARCHAR(10) COLLATE japanese_ci_as);
CREATE TABLE babel_4638_t4(a VARCHAR(10) COLLATE hebrew_ci_as);
GO

INSERT INTO babel_4638_t1 VALUES('ح'), ('غ'), ('سسس'), ('للل');
INSERT INTO babel_4638_t2 VALUES('五'), ('九'), ('乙乙乙'), ('魚魚魚');
INSERT INTO babel_4638_t3 VALUES('あ'), ('九'), ('ちちち'), ('さささ');
INSERT INTO babel_4638_t4 VALUES('ב'), ('א'), ('קקק'), ('מממ');
GO
39 changes: 39 additions & 0 deletions test/JDBC/input/BABEL-4638-vu-verify.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
-- arabic_ci_as
SELECT * FROM babel_4638_t1
GO

SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t1
GO

SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t1
GO

-- chinese_prc_ci_as
SELECT * FROM babel_4638_t2
GO

SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t2
GO

SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t2
GO

-- japanese_ci_as
SELECT * FROM babel_4638_t3
GO

SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t3
GO

SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t3
GO

-- hebrew_ci_as
SELECT * FROM babel_4638_t4
GO

SELECT CONCAT(CAST(a AS CHAR(1)), '|') FROM babel_4638_t4
GO

SELECT CONCAT(CAST(a AS CHAR(5)), '|') FROM babel_4638_t4
GO

0 comments on commit 285425b

Please sign in to comment.