Skip to content

Commit 2dab607

Browse files
authored
Merge branch 'develop' into feature/pure_sql
2 parents e32d700 + d8d12cb commit 2dab607

31 files changed

Lines changed: 406 additions & 123 deletions
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Provide version info**
14+
Information about utPLSQL and Database version,
15+
```sql
16+
set serveroutput on
17+
declare
18+
l_version varchar2(255);
19+
l_compatibility varchar2(255);
20+
begin
21+
dbms_utility.db_version( l_version, l_compatibility );
22+
dbms_output.put_line( l_version );
23+
dbms_output.put_line( l_compatibility );
24+
end;
25+
/
26+
select substr(ut.version(),1,60) as ut_version from dual;
27+
select * from v$version;
28+
select * from nls_session_parameters;
29+
select substr(dbms_utility.port_string,1,60) as port_string from dual;
30+
```
31+
32+
**Information about client software**
33+
What client was used to run utPLSQL tests? Was it from TOAD, SQLDeveloper, SQLPlus, PLSQL Developer etc...
34+
35+
**To Reproduce**
36+
Steps to reproduce the behavior:
37+
1. Go to '...'
38+
2. Click on '....'
39+
3. Scroll down to '....'
40+
4. See error
41+
42+
**Expected behavior**
43+
A clear and concise description of what you expected to happen.
44+
45+
**Example code**
46+
If applicable, add sample code to help explain your problem.
47+
Please avoid putting your company private/protected code in an issue, as it might violate your company's privacy and security policies.
48+
49+
**Additional context**
50+
Add any other context about the problem here.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
21+
22+
**Note**
23+
> Please do not create issues for generic SQL or PL/SQL questions. There are other forums and communities to help you with those. See [ASKTom](https://asktom.oracle.com) for example.
24+
25+
**Want to discuss**
26+
If you want to discuss your issue, join [our SLACK chat](http://utplsql-slack-invite.herokuapp.com/).

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at utplsql@utplsql.org. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq
7.49 KB
Loading
18.4 KB
Loading

examples/developer_examples/RunExampleTestSuiteWithCompositeReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ begin
3333
l_run := ut_run(ut_suite_items(l_suite));
3434
l_run.do_execute();
3535

36-
ut_event_manager.trigger_event(ut_utils.gc_finalize, l_run);
36+
ut_event_manager.trigger_event(ut_event_manager.gc_finalize, l_run);
3737
l_doc_reporter.lines_to_dbms_output(0,0);
3838
l_tc_reporter.lines_to_dbms_output(0,0);
3939
end;

examples/developer_examples/RunExampleTestSuiteWithCustomReporter.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ begin
4343
ut_event_manager.add_listener(l_reporter);
4444
l_run := ut_run(ut_suite_items(l_suite));
4545
l_run.do_execute();
46-
ut_event_manager.trigger_event(ut_utils.gc_finalize, l_run);
46+
ut_event_manager.trigger_event(ut_event_manager.gc_finalize, l_run);
4747
l_reporter.lines_to_dbms_output(0,0);
4848
end;
4949
/

readme.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# utPLSQL v3<sub><sup> | Powerful PL/SQL Unit Testing Framework </sup></sub>
1+
![utPLSQL v3 | Powerful PL/SQL Unit Testing Framework](docs/images/utPLSQL-testing-framework-transparent_120.png)
2+
3+
----------
24

35
[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL.svg)](https://github.com/utPLSQL/utPLSQL/releases)
46
[![license](https://img.shields.io/github/license/utPLSQL/utPLSQL.svg)](https://www.apache.org/licenses/LICENSE-2.0)
@@ -234,3 +236,16 @@ __Project Directories__
234236
* source - The installation code for utPLSQL
235237
* tests - Tests for utPLSQL framework
236238

239+
-----------
240+
# Supporters
241+
242+
The utPLSQL project is community-driven and is not commercially motivated. Nonetheless, donations and other contributions are always welcome, and are detailed below.
243+
244+
<table>
245+
<tbody>
246+
<tr>
247+
<td><a href="https://www.red-gate.com/hub/events/open-source-projects" rel="nofollow"><img src="docs/images/supported_by_redgate_100.png" alt="supported_by_redgate" style="max-width:100%;"></a></td>
248+
<td>utPLSQL has been supported by Redgate in the form of sponsored stickers and t-shirts. Thank you for helping us spreading the word!</td>
249+
</tr>
250+
</tbody>
251+
</table>

source/api/ut_runner.pkb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ create or replace package body ut_runner is
4545
procedure finish_run(a_run ut_run, a_force_manual_rollback boolean) is
4646
begin
4747
ut_utils.cleanup_temp_tables;
48-
ut_event_manager.trigger_event(ut_utils.gc_finalize, a_run);
48+
ut_event_manager.trigger_event(ut_event_manager.gc_finalize, a_run);
4949
ut_metadata.reset_source_definition_cache;
5050
ut_utils.read_cache_to_dbms_output();
5151
ut_coverage_helper.cleanup_tmp_table();
@@ -142,9 +142,12 @@ create or replace package body ut_runner is
142142
set(a_test_file_mappings),
143143
a_client_character_set
144144
);
145+
146+
ut_event_manager.trigger_event(ut_event_manager.gc_initialize, l_run);
147+
145148
ut_suite_manager.configure_execution_by_path(l_paths, l_run.items);
146149
if a_force_manual_rollback then
147-
l_run.set_rollback_type(ut_utils.gc_rollback_manual, a_force=>true);
150+
l_run.set_rollback_type( a_rollback_type => ut_utils.gc_rollback_manual, a_force => true );
148151
end if;
149152

150153
l_run.do_execute();

source/core/annotations/ut_annotation_parser.pkb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ create or replace package body ut_annotation_parser as
1919
------------------------------
2020
--private definitions
2121

22-
type tt_comment_list is table of varchar2(32767) index by pls_integer;
22+
type tt_comment_list is table of varchar2(32767) index by binary_integer;
2323

2424
gc_annotation_qualifier constant varchar2(1) := '%';
2525
gc_annot_comment_pattern constant varchar2(30) := '^( |'||chr(09)||')*-- *('||gc_annotation_qualifier||'.*?)$'; -- chr(09) is a tab character
2626
gc_comment_replacer_patter constant varchar2(50) := '{COMMENT#%N%}';
2727
gc_comment_replacer_regex_ptrn constant varchar2(25) := '{COMMENT#(\d+)}';
28-
gc_regexp_identifier constant varchar2(50) := '[a-z][a-z0-9#_$]*';
28+
gc_regexp_identifier constant varchar2(50) := '[a-zA-Z][a-zA-Z0-9#_$]*';
2929
gc_annotation_block_pattern constant varchar2(200) := '(({COMMENT#.+}'||chr(10)||')+)( |'||chr(09)||')*(procedure|function)\s+(' ||
3030
gc_regexp_identifier || ')';
3131
gc_annotation_pattern constant varchar2(50) := gc_annotation_qualifier || gc_regexp_identifier || '[ '||chr(9)||']*(\(.*?\)\s*?$)?';
@@ -46,10 +46,7 @@ create or replace package body ut_annotation_parser as
4646
if l_annotation_str is not null then
4747

4848
-- get the annotation name and it's parameters if present
49-
l_annotation_name := lower(regexp_substr(l_annotation_str
50-
,'%(' || gc_regexp_identifier || ')'
51-
,modifier => 'i'
52-
,subexpression => 1));
49+
l_annotation_name := lower(regexp_substr(l_annotation_str ,'%(' || gc_regexp_identifier || ')', subexpression => 1));
5350
l_annotation_text := trim(regexp_substr(l_annotation_str, '\((.*?)\)\s*$', subexpression => 1));
5451

5552
a_annotations.extend;
@@ -59,7 +56,7 @@ create or replace package body ut_annotation_parser as
5956
end;
6057

6158
procedure delete_processed_comments( a_comments in out nocopy tt_comment_list, a_annotations ut_annotations ) is
62-
l_loop_index pls_integer := 1;
59+
l_loop_index binary_integer := 1;
6360
begin
6461
l_loop_index := a_annotations.first;
6562
while l_loop_index is not null loop
@@ -74,8 +71,8 @@ create or replace package body ut_annotation_parser as
7471
a_comments tt_comment_list,
7572
a_subobject_name varchar2 := null
7673
) is
77-
l_loop_index pls_integer := 1;
78-
l_annotation_index pls_integer;
74+
l_loop_index binary_integer := 1;
75+
l_annotation_index binary_integer;
7976
begin
8077
-- loop while there are unprocessed comment blocks
8178
while 0 != nvl(regexp_instr(srcstr => a_source

0 commit comments

Comments
 (0)