Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 95dacf8

Browse files
committed
Put back accidentally-deleted quote_literal() regression tests.
1 parent 506070b commit 95dacf8

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

src/test/regress/expected/text.out

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ LINE 1: select 3 || 4.0;
5252
^
5353
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
5454
/*
55-
* string functions
55+
* various string functions
5656
*/
5757
select concat('one');
5858
concat
@@ -118,6 +118,27 @@ select i, left('ahoj', i), right('ahoj', i) from generate_series(-5, 5) t(i) ord
118118
5 | ahoj | ahoj
119119
(11 rows)
120120

121+
select quote_literal('');
122+
quote_literal
123+
---------------
124+
''
125+
(1 row)
126+
127+
select quote_literal('abc''');
128+
quote_literal
129+
---------------
130+
'abc'''
131+
(1 row)
132+
133+
select quote_literal(e'\\');
134+
quote_literal
135+
---------------
136+
E'\\'
137+
(1 row)
138+
139+
/*
140+
* format
141+
*/
121142
select format(NULL);
122143
format
123144
--------

src/test/regress/sql/text.sql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ select 'four: ' || 2+2;
3030
select 3 || 4.0;
3131

3232
/*
33-
* string functions
33+
* various string functions
3434
*/
3535
select concat('one');
3636
select concat(1,2,3,'hello',true, false, to_date('20100309','YYYYMMDD'));
@@ -41,7 +41,13 @@ select concat_ws('',10,20,null,30);
4141
select concat_ws(NULL,10,20,null,30) is null;
4242
select reverse('abcde');
4343
select i, left('ahoj', i), right('ahoj', i) from generate_series(-5, 5) t(i) order by i;
44+
select quote_literal('');
45+
select quote_literal('abc''');
46+
select quote_literal(e'\\');
4447

48+
/*
49+
* format
50+
*/
4551
select format(NULL);
4652
select format('Hello');
4753
select format('Hello %s', 'World');

0 commit comments

Comments
 (0)