Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitab4e386

Browse files
committed
Fix ecpg tests for change that disallowed Unicode literals unless
standard_conforming_strings is on.
1 parentd7ee335 commitab4e386

File tree

3 files changed

+28
-16
lines changed

3 files changed

+28
-16
lines changed

‎src/interfaces/ecpg/test/expected/preproc-strings.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ int main(void)
3737
#line 13 "strings.pgc"
3838

3939

40+
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"set standard_conforming_strings to on",ECPGt_EOIT,ECPGt_EORT);}
41+
#line 15 "strings.pgc"
42+
43+
4044
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"select 'abcdef' , N'abcdef' as foo , E'abc\\bdef' as \"foo\" , U&'d\\0061t\\0061' as U&\"foo\" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$",ECPGt_EOIT,
4145
ECPGt_char,&(s1),(long)0,(long)1,(1)*sizeof(char),
4246
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
@@ -50,13 +54,13 @@ int main(void)
5054
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
5155
ECPGt_char,&(s6),(long)0,(long)1,(1)*sizeof(char),
5256
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);}
53-
#line21 "strings.pgc"
57+
#line23 "strings.pgc"
5458

5559

5660
printf("%s %s %s %s %s %s\n",s1,s2,s3,s4,s5,s6);
5761

5862
{ECPGdisconnect(__LINE__,"CURRENT");}
59-
#line25 "strings.pgc"
63+
#line27 "strings.pgc"
6064

6165
exit (0);
6266
}

‎src/interfaces/ecpg/test/expected/preproc-strings.stderr

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,41 @@
22
[NO_PID]: sqlca: code: 0, state: 00000
33
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
44
[NO_PID]: sqlca: code: 0, state: 00000
5-
[NO_PID]: ecpg_execute on line 15: query:select 'abcdef' , N'abcdef' as foo , E'abc\bdef' as "foo" , U&'d\0061t\0061' as U&"foo" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$; with 0 parameter(s) on connection regress1
5+
[NO_PID]: ecpg_execute on line 15: query:set standard_conforming_strings to on; with 0 parameter(s) on connection regress1
66
[NO_PID]: sqlca: code: 0, state: 00000
77
[NO_PID]: ecpg_execute on line 15: using PQexec
88
[NO_PID]: sqlca: code: 0, state: 00000
9-
[NO_PID]: ecpg_execute on line 15:correctly got 1 tuples with 6 fields
9+
[NO_PID]: ecpg_execute on line 15:OK: SET
1010
[NO_PID]: sqlca: code: 0, state: 00000
11-
[NO_PID]:ecpg_store_result on line15: allocating memory for 1 tuples
11+
[NO_PID]:ecpg_execute on line17: query: select 'abcdef' , N'abcdef' as foo , E'abc\bdef' as "foo" , U&'d\0061t\0061' as U&"foo" , U&'d!+000061t!+000061' uescape '!' , $foo$abc$def$foo$; with 0 parameter(s) on connection regress1
1212
[NO_PID]: sqlca: code: 0, state: 00000
13-
[NO_PID]:ecpg_get_data on line15: RESULT: abcdef offset: -1; array: yes
13+
[NO_PID]:ecpg_execute on line17: using PQexec
1414
[NO_PID]: sqlca: code: 0, state: 00000
15-
[NO_PID]:ecpg_store_result on line15: allocating memory for1 tuples
15+
[NO_PID]:ecpg_execute on line17: correctly got1 tuples with 6 fields
1616
[NO_PID]: sqlca: code: 0, state: 00000
17-
[NO_PID]:ecpg_get_data on line15: RESULT: abcdef offset: -1; array: yes
17+
[NO_PID]:ecpg_store_result on line17: allocating memory for 1 tuples
1818
[NO_PID]: sqlca: code: 0, state: 00000
19-
[NO_PID]:ecpg_store_result on line15: allocating memory for 1 tuples
19+
[NO_PID]:ecpg_get_data on line17: RESULT: abcdef offset: -1; array: yes
2020
[NO_PID]: sqlca: code: 0, state: 00000
21-
[NO_PID]:ecpg_get_data on line15: RESULT: abcdef offset: -1; array: yes
21+
[NO_PID]:ecpg_store_result on line17: allocating memory for 1 tuples
2222
[NO_PID]: sqlca: code: 0, state: 00000
23-
[NO_PID]:ecpg_store_result on line15: allocating memory for 1 tuples
23+
[NO_PID]:ecpg_get_data on line17: RESULT: abcdef offset: -1; array: yes
2424
[NO_PID]: sqlca: code: 0, state: 00000
25-
[NO_PID]:ecpg_get_data on line15: RESULT: data offset: -1; array: yes
25+
[NO_PID]:ecpg_store_result on line17: allocating memory for 1 tuples
2626
[NO_PID]: sqlca: code: 0, state: 00000
27-
[NO_PID]:ecpg_store_result on line15: allocating memory for 1 tuples
27+
[NO_PID]:ecpg_get_data on line17: RESULT: abcdef offset: -1; array: yes
2828
[NO_PID]: sqlca: code: 0, state: 00000
29-
[NO_PID]:ecpg_get_data on line15: RESULT: data offset: -1; array: yes
29+
[NO_PID]:ecpg_store_result on line17: allocating memory for 1 tuples
3030
[NO_PID]: sqlca: code: 0, state: 00000
31-
[NO_PID]:ecpg_store_result on line15: allocating memory for 1 tuples
31+
[NO_PID]:ecpg_get_data on line17: RESULT: data offset: -1; array: yes
3232
[NO_PID]: sqlca: code: 0, state: 00000
33-
[NO_PID]: ecpg_get_data on line 15: RESULT: abc$def offset: -1; array: yes
33+
[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples
34+
[NO_PID]: sqlca: code: 0, state: 00000
35+
[NO_PID]: ecpg_get_data on line 17: RESULT: data offset: -1; array: yes
36+
[NO_PID]: sqlca: code: 0, state: 00000
37+
[NO_PID]: ecpg_store_result on line 17: allocating memory for 1 tuples
38+
[NO_PID]: sqlca: code: 0, state: 00000
39+
[NO_PID]: ecpg_get_data on line 17: RESULT: abc$def offset: -1; array: yes
3440
[NO_PID]: sqlca: code: 0, state: 00000
3541
[NO_PID]: ecpg_finish: connection regress1 closed
3642
[NO_PID]: sqlca: code: 0, state: 00000

‎src/interfaces/ecpg/test/preproc/strings.pgc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ int main(void)
1212

1313
exec sql connect to REGRESSDB1;
1414

15+
exec sql set standard_conforming_strings to on;
16+
1517
exec sql select 'abcdef',
1618
N'abcdef' AS foo,
1719
E'abc\bdef' AS "foo",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp