@@ -379,7 +379,7 @@ create or replace package body ut_suite_manager is
379379 else
380380 for i in 1 .. a_paths.count loop
381381 l_path := a_paths(i);
382- if l_path is null or not (regexp_like(l_path, '^\w +(\.\w +){0,2}$') or regexp_like(l_path, '^(\w +)?:\w +(\.\w +)*$')) then
382+ if l_path is null or not (regexp_like(l_path, '^[A-Za-z0-9$#_] +(\.[A-Za-z0-9$#_] +){0,2}$') or regexp_like(l_path, '^([A-Za-z0-9$#_] +)?:[A-Za-z0-9$#_] +(\.[A-Za-z0-9$#_] +)*$')) then
383383 raise_application_error(ut_utils.gc_invalid_path_format, 'Invalid path format: ' || nvl(l_path, 'NULL'));
384384 end if;
385385 end loop;
@@ -410,7 +410,7 @@ create or replace package body ut_suite_manager is
410410 end clean_paths;
411411
412412 procedure skip_by_path(a_suite in out nocopy ut_suite_item, a_path varchar2) is
413- c_root constant varchar2(32767) := regexp_substr(a_path, '\w+ ');
413+ c_root constant varchar2(32767) := replace( regexp_substr(a_path, '[A-Za-z0-9$#_]+'), '$', '\$ ');
414414 c_rest_path constant varchar2(32767) := regexp_substr(a_path, '\.(.+)', subexpression => 1);
415415 l_suite ut_logical_suite;
416416 l_item ut_suite_item;
@@ -428,7 +428,7 @@ create or replace package body ut_suite_manager is
428428 l_item := l_suite.items(i);
429429
430430 l_item_name := l_item.name;
431- --l_item_name := regexp_substr(l_item_name,'\w +$'); -- temporary fix. seems like suite have suitepath in object_name
431+ --l_item_name := regexp_substr(l_item_name,'[A-Za-z0-9$#_] +$'); -- temporary fix. seems like suite have suitepath in object_name
432432 if regexp_like(l_item_name, c_root, modifier => 'i') then
433433
434434 skip_by_path(l_item, c_rest_path);
@@ -473,8 +473,8 @@ create or replace package body ut_suite_manager is
473473 for i in 1 .. l_paths.count loop
474474 l_path := l_paths(i);
475475
476- if regexp_like(l_path, '^(\w +)?:') then
477- l_schema := regexp_substr(l_path, '^(\w +)?:',subexpression => 1);
476+ if regexp_like(l_path, '^([A-Za-z0-9$#_] +)?:') then
477+ l_schema := regexp_substr(l_path, '^([A-Za-z0-9$#_] +)?:',subexpression => 1);
478478 -- transform ":path1[.path2]" to "schema:path1[.path2]"
479479 if l_schema is not null then
480480 l_schema := sys.dbms_assert.schema_name(upper(l_schema));
@@ -486,7 +486,7 @@ create or replace package body ut_suite_manager is
486486 -- When path is one of: schema or schema.package[.object] or package[.object]
487487 -- transform it back to schema[.package[.object]]
488488 begin
489- l_schema := regexp_substr(l_path, '^\w +');
489+ l_schema := regexp_substr(l_path, '^[A-Za-z0-9$#_] +');
490490 l_schema := sys.dbms_assert.schema_name(upper(l_schema));
491491 exception
492492 when sys.dbms_assert.invalid_schema_name then
@@ -502,7 +502,7 @@ create or replace package body ut_suite_manager is
502502
503503 l_schema_suites := get_schema_suites(upper(l_schema));
504504
505- if regexp_like(l_path, '^\w +$') then
505+ if regexp_like(l_path, '^[A-Za-z0-9$#_] +$') then
506506 -- run whole schema
507507 l_index := l_schema_suites.first;
508508 while l_index is not null loop
@@ -512,14 +512,14 @@ create or replace package body ut_suite_manager is
512512 end loop;
513513 else
514514 -- convert SCHEMA.PACKAGE.PROCEDURE syntax to fully qualified path
515- if regexp_like(l_path, '^\w +(\.\w +){1,2}$') then
515+ if regexp_like(l_path, '^[A-Za-z0-9$#_] +(\.[A-Za-z0-9$#_] +){1,2}$') then
516516 declare
517517 l_temp_suite ut_logical_suite;
518518 l_package_name varchar2(4000);
519519 l_procedure_name varchar2(4000);
520520 begin
521- l_package_name := regexp_substr(l_path, '^\w +\.(\w +)(\.(\w +))?$', subexpression => 1);
522- l_procedure_name := regexp_substr(l_path, '^\w +\.(\w +)(\.(\w +))?$', subexpression => 3);
521+ l_package_name := regexp_substr(l_path, '^[A-Za-z0-9$#_] +\.([A-Za-z0-9$#_] +)(\.([A-Za-z0-9$#_] +))?$', subexpression => 1);
522+ l_procedure_name := regexp_substr(l_path, '^[A-Za-z0-9$#_] +\.([A-Za-z0-9$#_] +)(\.([A-Za-z0-9$#_] +))?$', subexpression => 3);
523523
524524 l_temp_suite := config_package(l_schema, l_package_name);
525525
@@ -535,7 +535,7 @@ create or replace package body ut_suite_manager is
535535 -- by this time it's the only format left
536536 -- schema:suite.suite.suite
537537 l_suite_path := regexp_substr(l_path, ':(.+)', subexpression => 1);
538- l_root_suite_name := regexp_substr(l_suite_path, '^\w +');
538+ l_root_suite_name := regexp_substr(l_suite_path, '^[A-Za-z0-9$#_] +');
539539
540540 begin
541541 l_suite := l_schema_suites(l_root_suite_name);
0 commit comments