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

Commit e1bc807

Browse files
author
Rinat Mukhtarov
committed
sql_comments_remove() test improved
1 parent abd3df9 commit e1bc807

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

‎functions/sql_comments_remove.sql‎

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,23 +61,28 @@ $$;
6161
DO $do$
6262
DECLARE
6363
sql text default $sql$
64-
TEST sql_comments_remove() start
65-
,qq --/*7/*8*/9*/!
66-
,'st--\''ri$$ng/*--*/'!
67-
,e' \' --/*1''2 */'!
68-
,"id--""/*--*/en$$t\"\\"!
69-
,/*--"456--*/!
70-
,/* многострочный" комментарий"!
71-
,--123---!
72-
,\* /*с*/ вложенностью: /* вложенный /*блок*/" комментария */!
73-
,*/!
74-
,$$dol--lar$$!
75-
,$b$dol--lar$b$!
76-
TEST sql_comments_remove() end
64+
select
65+
'TEST sql_comments_remove() start'
66+
,1,'qq' --/*7/*8*/9*/!
67+
,2,'st--\''ri$$ng'/*--*/
68+
,3,'e', ' \' --/*1''2 */!'
69+
,4 as "id--""/*--*/en$$t\""\\!"
70+
,5 /*--"456--!*/
71+
,6 /* многострочный" комментарий"!
72+
,,--123---!
73+
,,\* /*с*/ вложенностью: /* вложенный /*блок*/" комментария */!
74+
,!*/
75+
,7, $$dol--lar!$$
76+
,8, $b$dol--lar!$b$
77+
,'TEST sql_comments_remove() end'
7778
$sql$;
78-
7979
BEGIN
80-
--raise notice '%', sql_comments_remove(sql);
81-
perform public.sql_comments_remove(sql);
82-
END;
80+
raise notice '%', sql;
81+
execute sql;
82+
83+
sql := sql_comments_remove(sql);
84+
85+
raise notice '%', sql;
86+
execute sql;
87+
END
8388
$do$;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /