-
Notifications
You must be signed in to change notification settings - Fork 185
Fix error with space before annotation params #375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
source/core/ut_suite_manager.pkb
Outdated
@@ -84,7 +84,7 @@ create or replace package body ut_suite_manager is | |||
l_suite_name := l_annotation_data.package_annotations('suite').text; | |||
end if; | |||
|
|||
if l_annotation_data.package_annotations.exists('suitepath') then | |||
if l_annotation_data.package_annotations.exists('suitepath') and trim(l_annotation_data.package_annotations('suitepath').text) is not null then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the trim
should be done on the text of annotation param inside the annotation parser.
--act | ||
l_objects_to_run := ut_suite_manager.configure_execution_by_path(ut_varchar2_list('tst_empty_suite_path')); | ||
|
||
if ut_expectation_processor.get_status = ut_utils.tr_success then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how will this test ever fail, as there is no expectation executed before status is checked.
|
||
--Assert | ||
l_ann_param := null; | ||
l_ann_param.val := 'Name of suite'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 24 and 25 are not used I think
source/core/ut_annotations.pkb
Outdated
@@ -30,7 +30,7 @@ create or replace package body ut_annotations as | |||
c_rgexp_identifier constant varchar2(50) := '[a-z][a-z0-9#_$]*'; | |||
c_annotation_block_pattern constant varchar2(200) := '(({COMMENT#.+}'||chr(10)||')+)( |'||chr(09)||')*(procedure|function)\s+(' || | |||
c_rgexp_identifier || ')'; | |||
c_annotation_pattern constant varchar2(50) := gc_annotation_qualifier || c_rgexp_identifier || '(\(.*?\)$)?'; | |||
c_annotation_pattern constant varchar2(50) := gc_annotation_qualifier || c_rgexp_identifier || '[ '||chr(9)||']*(\(.*?\)$)?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use \s*
rather than chr(9)
?
We should also enhance the pattern to allow \s at the end I think.
So how about:
gc_annotation_qualifier || c_rgexp_identifier || '\s*(\(.*?\)\s*$)?';
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\s
contains new line character which is not allowed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the regexp work with trailing spaces?
'[ '||chr(9)||]((.?)[ '||chr(9)||']*$)?'
fixed additional recent tests
source/core/ut_annotations.pkb
Outdated
@@ -30,7 +30,7 @@ create or replace package body ut_annotations as | |||
c_rgexp_identifier constant varchar2(50) := '[a-z][a-z0-9#_$]*'; | |||
c_annotation_block_pattern constant varchar2(200) := '(({COMMENT#.+}'||chr(10)||')+)( |'||chr(09)||')*(procedure|function)\s+(' || | |||
c_rgexp_identifier || ')'; | |||
c_annotation_pattern constant varchar2(50) := gc_annotation_qualifier || c_rgexp_identifier || '(\(.*?\)$)?'; | |||
c_annotation_pattern constant varchar2(50) := gc_annotation_qualifier || c_rgexp_identifier || '[ '||chr(9)||']*(\(.*?\)$)?'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make the regexp work with trailing spaces?
'[ '||chr(9)||]((.?)[ '||chr(9)||']*$)?'
1 similar comment
1 similar comment
1 similar comment
1 similar comment
2 similar comments
### Documentation #399 Documentation now refers to [migration](https://github.com/utPLSQL/utPLSQL-v2-v3-migration) project #386 Documentation now refers to a valid object name: `ut_file_mapping` #362 Install and Uninstall scripts are now much more readable #361 Install guide now provides snippet on how to download latest release on Windows ### Installation #396 Added override user/password/tablespace for install_headless #384 Installation is now smooth even if profiler tables already exist ### Internal improvements #388 Improved reporting from RunTest #363 Fixed publishing of release documentation history ### Improvements and fixes #407 Fixed rare issue with `ORA-22813: operand value exceeds system limits` #403 Stack trace is now properly parsed on all machines #397 The `--%disabled` annotation on suite level is now reporting all tests as disabled #395 Coverage reporting is now properly filtering test packages on that use suitepath #390 Line of code for failed expectation is now also shown for unit tests owned by other users #380 Line no of failed test is now properly reported when using `ut.fail` #375 Annotation parameter list can now have spaces before/after brackets #373 Warnings in documentation reporter are now properly numbered #372 Documentation reporter is now providing a timing information for each test #370 by xUnit reporter now displays name of the package/procedure if suite/test has no description #369 Fixed errors with multi-byte characters in conversion from/to clob
addresses #357