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

Skip to content

Commit bb52422

Browse files
Merge pull request #892 from utPLSQL/bugfix/issue_891
Bugfix/issue 891
2 parents 25be0fd + 675ba70 commit bb52422

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

docs/userguide/expectations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ begin
272272
end;
273273
```
274274

275-
Parameters `a_mask` and `a_escape_char` represent valid parameters of the [Oracle LIKE condition](https://docs.oracle.com/database/121/SQLRF/conditions007.htm#SQLRF52142)
275+
Parameters `a_mask` and `a_escape_char` represent valid parameters of the [Oracle LIKE condition](https://docs.oracle.com/database/121/SQLRF/conditions007.htm#SQLRF52142).
276+
277+
If you use Oracle Database version 11.2.0.4, you may run into Oracle Bug 14402514: WRONG RESULTS WITH LIKE ON CLOB USING ESCAPE CHARACTER. In this case we recommend to use `match` instead of `be_like`.
276278

277279

278280
## be_not_null

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)