Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 675ba70

Browse files
Fixes #891 - use to_match instead of to_be_like to avoid Oracle bug 14402514 on some 11.2.0.4 instances
1 parent 4643b14 commit 675ba70

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

test/core/test_suite_builder.pkb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,11 @@ create or replace package body test_suite_builder is
608608
--Act
609609
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
610610
--Assert
611-
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%beforeall&quot;%line 2%</WARNINGS>%', '\');
612-
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%beforeeach&quot;%line 3%</WARNINGS>%', '\');
613-
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%aftereach&quot;%line 4%</WARNINGS>%', '\');
614-
ut.expect(l_actual).to_be_like('%<WARNINGS>%Annotation &quot;--\%afterall&quot; cannot be used with &quot;--\%test&quot;. Annotation ignored.'
615-
||'%at &quot;UT3_TESTER.SOME_PACKAGE.DO_STUFF&quot;, line 5%</WARNINGS>%', '\');
611+
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%beforeall&quot;)(.*)(line 2)(.*)(</WARNINGS>)(.*)', 'n');
612+
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%beforeeach&quot;)(.*)(line 3)(.*)(</WARNINGS>)(.*)', 'n');
613+
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%aftereach&quot;)(.*)(line 4)(.*)(</WARNINGS>)(.*)', 'n');
614+
ut.expect(l_actual).to_match('(.*)(<WARNINGS>)(.*)(Annotation &quot;--%afterall&quot; cannot be used with &quot;--%test&quot;. Annotation ignored.)'
615+
||'(.*)(at &quot;UT3_TESTER.SOME_PACKAGE.DO_STUFF&quot;, line 5)(.*)(</WARNINGS>)(.*)', 'n');
616616
ut.expect(l_actual).not_to_be_like('%<BEFORE_EACH_LIST>%');
617617
ut.expect(l_actual).not_to_be_like('%<AFTER_EACH_LIST>%');
618618
ut.expect(l_actual).not_to_be_like('%<BEFORE_ALL_LIST>%');
@@ -1095,7 +1095,7 @@ create or replace package body test_suite_builder is
10951095
--Act
10961096
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
10971097
--Assert
1098-
ut.expect(l_actual).to_be_like('%<WARNINGS><VARCHAR2>Unsupported annotation &quot;--\%bad_procedure_annotation&quot;. Annotation ignored.% line 2</VARCHAR2></WARNINGS>%', '\');
1098+
ut.expect(l_actual).to_match('(.*)(<WARNINGS><VARCHAR2>Unsupported annotation &quot;--%bad_procedure_annotation&quot;\. Annotation ignored\.)(.*)( line 2</VARCHAR2></WARNINGS>)(.*)', 'n');
10991099
end;
11001100

11011101
procedure test_bad_package_annotation is
@@ -1111,7 +1111,7 @@ create or replace package body test_suite_builder is
11111111
--Act
11121112
l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE');
11131113
--Assert
1114-
ut.expect(l_actual).to_be_like('%<WARNINGS><VARCHAR2>Unsupported annotation &quot;--\%bad_package_annotation&quot;. Annotation ignored.% line 17</VARCHAR2></WARNINGS>%', '\');
1114+
ut.expect(l_actual).to_match('(.*)(<WARNINGS><VARCHAR2>Unsupported annotation &quot;--%bad_package_annotation&quot;\. Annotation ignored\.)(.*)( line 17</VARCHAR2></WARNINGS>)(.*)', 'n');
11151115
end;
11161116

11171117
end test_suite_builder;

0 commit comments

Comments
 (0)