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

Commit80f95a6

Browse files
author
Michael Meskes
committed
When changing a regression test file one should also change the expected output file.
1 parent934eab7 commit80f95a6

File tree

2 files changed

+35
-34
lines changed

2 files changed

+35
-34
lines changed

‎src/interfaces/ecpg/test/expected/sql-binary.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ main (void)
123123

124124
printf ("name=%s, accs=%d byte=%s\n",empl.name,empl.accs,empl.byte);
125125

126+
memset(empl.name,0,21L);
126127
/* declare B binary cursor for select name , accs , byte from empl where idnum = $1 */
127-
#line62 "binary.pgc"
128+
#line63 "binary.pgc"
128129

129130
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"declare B binary cursor for select name , accs , byte from empl where idnum = $1 ",
130131
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
131132
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EOIT,ECPGt_EORT);}
132-
#line63 "binary.pgc"
133+
#line64 "binary.pgc"
133134

134135
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"fetch B",ECPGt_EOIT,
135136
ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
@@ -138,7 +139,7 @@ main (void)
138139
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,
139140
ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
140141
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);}
141-
#line64 "binary.pgc"
142+
#line65 "binary.pgc"
142143

143144
if (sqlca.sqlcode)
144145
{
@@ -147,7 +148,7 @@ main (void)
147148
}
148149

149150
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"close B",ECPGt_EOIT,ECPGt_EORT);}
150-
#line71 "binary.pgc"
151+
#line72 "binary.pgc"
151152

152153

153154
/* do not print a.accs because big/little endian will have different outputs here */
@@ -157,17 +158,17 @@ main (void)
157158
printf("\n");
158159

159160
/* declare A binary cursor for select byte from empl where idnum = $1 */
160-
#line79 "binary.pgc"
161+
#line80 "binary.pgc"
161162

162163
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"declare A binary cursor for select byte from empl where idnum = $1 ",
163164
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
164165
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EOIT,ECPGt_EORT);}
165-
#line80 "binary.pgc"
166+
#line81 "binary.pgc"
166167

167168
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"fetch A",ECPGt_EOIT,
168169
ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char),
169170
ECPGt_NO_INDICATOR,NULL ,0L,0L,0L,ECPGt_EORT);}
170-
#line81 "binary.pgc"
171+
#line82 "binary.pgc"
171172

172173
if (sqlca.sqlcode)
173174
{
@@ -176,7 +177,7 @@ main (void)
176177
}
177178

178179
{ECPGdo(__LINE__,0,1,NULL,0,ECPGst_normal,"close A",ECPGt_EOIT,ECPGt_EORT);}
179-
#line88 "binary.pgc"
180+
#line89 "binary.pgc"
180181

181182

182183
printf ("pointer=");
@@ -186,7 +187,7 @@ main (void)
186187
free(pointer);
187188

188189
{ECPGdisconnect(__LINE__,"CURRENT");}
189-
#line96 "binary.pgc"
190+
#line97 "binary.pgc"
190191

191192
exit (0);
192193
}

‎src/interfaces/ecpg/test/expected/sql-binary.stderr

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,55 +36,55 @@
3636
[NO_PID]: sqlca: code: 0, state: 00000
3737
[NO_PID]: ecpg_get_data on line 53: RESULT: \001m\000\212 offset: -1; array: yes
3838
[NO_PID]: sqlca: code: 0, state: 00000
39-
[NO_PID]: ecpg_execute on line63: query: declare B binary cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1
39+
[NO_PID]: ecpg_execute on line64: query: declare B binary cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1
4040
[NO_PID]: sqlca: code: 0, state: 00000
41-
[NO_PID]: ecpg_execute on line63: using PQexecParams
41+
[NO_PID]: ecpg_execute on line64: using PQexecParams
4242
[NO_PID]: sqlca: code: 0, state: 00000
43-
[NO_PID]: free_params on line63: parameter 1 = 1
43+
[NO_PID]: free_params on line64: parameter 1 = 1
4444
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ecpg_execute on line63: OK: DECLARE CURSOR
45+
[NO_PID]: ecpg_execute on line64: OK: DECLARE CURSOR
4646
[NO_PID]: sqlca: code: 0, state: 00000
47-
[NO_PID]: ecpg_execute on line64: query: fetch B; with 0 parameter(s) on connection regress1
47+
[NO_PID]: ecpg_execute on line65: query: fetch B; with 0 parameter(s) on connection regress1
4848
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ecpg_execute on line64: using PQexec
49+
[NO_PID]: ecpg_execute on line65: using PQexec
5050
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ecpg_execute on line64: correctly got 1 tuples with 3 fields
51+
[NO_PID]: ecpg_execute on line65: correctly got 1 tuples with 3 fields
5252
[NO_PID]: sqlca: code: 0, state: 00000
53-
[NO_PID]: ecpg_get_data on line64: RESULT: BINARY offset: -1; array: yes
53+
[NO_PID]: ecpg_get_data on line65: RESULT: BINARY offset: -1; array: yes
5454
[NO_PID]: sqlca: code: 0, state: 00000
55-
[NO_PID]: ecpg_get_data on line64: RESULT: BINARY offset: -1; array: yes
55+
[NO_PID]: ecpg_get_data on line65: RESULT: BINARY offset: -1; array: yes
5656
[NO_PID]: sqlca: code: 0, state: 00000
57-
[NO_PID]: ecpg_get_data on line64: RESULT: BINARY offset: -1; array: yes
57+
[NO_PID]: ecpg_get_data on line65: RESULT: BINARY offset: -1; array: yes
5858
[NO_PID]: sqlca: code: 0, state: 00000
59-
[NO_PID]: ecpg_execute on line71: query: close B; with 0 parameter(s) on connection regress1
59+
[NO_PID]: ecpg_execute on line72: query: close B; with 0 parameter(s) on connection regress1
6060
[NO_PID]: sqlca: code: 0, state: 00000
61-
[NO_PID]: ecpg_execute on line71: using PQexec
61+
[NO_PID]: ecpg_execute on line72: using PQexec
6262
[NO_PID]: sqlca: code: 0, state: 00000
63-
[NO_PID]: ecpg_execute on line71: OK: CLOSE CURSOR
63+
[NO_PID]: ecpg_execute on line72: OK: CLOSE CURSOR
6464
[NO_PID]: sqlca: code: 0, state: 00000
65-
[NO_PID]: ecpg_execute on line80: query: declare A binary cursor for select byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1
65+
[NO_PID]: ecpg_execute on line81: query: declare A binary cursor for select byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1
6666
[NO_PID]: sqlca: code: 0, state: 00000
67-
[NO_PID]: ecpg_execute on line80: using PQexecParams
67+
[NO_PID]: ecpg_execute on line81: using PQexecParams
6868
[NO_PID]: sqlca: code: 0, state: 00000
69-
[NO_PID]: free_params on line80: parameter 1 = 1
69+
[NO_PID]: free_params on line81: parameter 1 = 1
7070
[NO_PID]: sqlca: code: 0, state: 00000
71-
[NO_PID]: ecpg_execute on line80: OK: DECLARE CURSOR
71+
[NO_PID]: ecpg_execute on line81: OK: DECLARE CURSOR
7272
[NO_PID]: sqlca: code: 0, state: 00000
73-
[NO_PID]: ecpg_execute on line81: query: fetch A; with 0 parameter(s) on connection regress1
73+
[NO_PID]: ecpg_execute on line82: query: fetch A; with 0 parameter(s) on connection regress1
7474
[NO_PID]: sqlca: code: 0, state: 00000
75-
[NO_PID]: ecpg_execute on line81: using PQexec
75+
[NO_PID]: ecpg_execute on line82: using PQexec
7676
[NO_PID]: sqlca: code: 0, state: 00000
77-
[NO_PID]: ecpg_execute on line81: correctly got 1 tuples with 1 fields
77+
[NO_PID]: ecpg_execute on line82: correctly got 1 tuples with 1 fields
7878
[NO_PID]: sqlca: code: 0, state: 00000
79-
[NO_PID]: ecpg_store_result on line81: allocating memory for 1 tuples
79+
[NO_PID]: ecpg_store_result on line82: allocating memory for 1 tuples
8080
[NO_PID]: sqlca: code: 0, state: 00000
81-
[NO_PID]: ecpg_get_data on line81: RESULT: BINARY offset: -1; array: yes
81+
[NO_PID]: ecpg_get_data on line82: RESULT: BINARY offset: -1; array: yes
8282
[NO_PID]: sqlca: code: 0, state: 00000
83-
[NO_PID]: ecpg_execute on line88: query: close A; with 0 parameter(s) on connection regress1
83+
[NO_PID]: ecpg_execute on line89: query: close A; with 0 parameter(s) on connection regress1
8484
[NO_PID]: sqlca: code: 0, state: 00000
85-
[NO_PID]: ecpg_execute on line88: using PQexec
85+
[NO_PID]: ecpg_execute on line89: using PQexec
8686
[NO_PID]: sqlca: code: 0, state: 00000
87-
[NO_PID]: ecpg_execute on line88: OK: CLOSE CURSOR
87+
[NO_PID]: ecpg_execute on line89: OK: CLOSE CURSOR
8888
[NO_PID]: sqlca: code: 0, state: 00000
8989
[NO_PID]: ecpg_finish: connection regress1 closed
9090
[NO_PID]: sqlca: code: 0, state: 00000

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp