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

Skip to content

Commit 3b7c40c

Browse files
authored
Merge branch 'develop' into feature/add_version_check
2 parents 4571a0a + f7c2730 commit 3b7c40c

3 files changed

Lines changed: 72 additions & 2 deletions

File tree

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ addons:
1515
branches:
1616
- develop
1717
- master
18-
- feature/using_released_to_test_develop
1918

2019
services:
2120
- docker
@@ -67,7 +66,7 @@ before_install:
6766
- git remote add origin https://${github_api_token}@github.com/${UTPLSQL_REPO}
6867
# download latest utPLSQL release
6968
#- curl -LOk $(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip" | sed 's/"//g')
70-
- git clone --depth=1 --branch=develop https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
69+
- git clone --depth=1 --branch=${SELFTESTING_BRANCH:-master} https://github.com/utPLSQL/utPLSQL.git $UTPLSQL_DIR
7170
# download utPLSQL-cli develop
7271
- curl -Lk -o utPLSQL-cli.zip https://bintray.com/viniciusam/utPLSQL-cli/download_file?file_path=utPLSQL-cli-develop-test3.zip
7372

test/ut_annotations/test_annotations.pkb

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,5 +510,70 @@ END;';
510510
check_annotation_parsing(l_expected, l_parsing_result);
511511
end;
512512

513+
procedure test_windows_newline
514+
as
515+
l_source clob;
516+
l_parsing_result ut3.ut_annotations.typ_annotated_package;
517+
l_expected ut3.ut_annotations.typ_annotated_package;
518+
l_ann_param ut3.ut_annotations.typ_annotation_param;
519+
begin
520+
l_source := 'PACKAGE test_tt AS
521+
-- %suite
522+
-- %displayname(Name of suite)' || chr(13) || chr(10)
523+
|| ' -- %suitepath(all.globaltests)
524+
END;';
525+
526+
--Act
527+
l_parsing_result := ut3.ut_annotations.parse_package_annotations(l_source);
528+
529+
--Assert
530+
l_ann_param := null;
531+
l_ann_param.val := 'Name of suite';
532+
l_expected.package_annotations('suite').params := cast( null as ut3.ut_annotations.tt_annotation_params);
533+
l_expected.package_annotations('displayname').params(1) := l_ann_param;
534+
535+
l_ann_param := null;
536+
l_ann_param.val := 'all.globaltests';
537+
l_expected.package_annotations('suitepath').params(1) := l_ann_param;
538+
539+
check_annotation_parsing(l_expected, l_parsing_result);
540+
end;
541+
542+
procedure test_annot_very_long_name
543+
as
544+
l_source clob;
545+
l_parsing_result ut3.ut_annotations.typ_annotated_package;
546+
l_expected ut3.ut_annotations.typ_annotated_package;
547+
l_ann_param ut3.ut_annotations.typ_annotation_param;
548+
begin
549+
l_source := 'PACKAGE test_tt AS
550+
-- %suite
551+
-- %displayname(Name of suite)
552+
-- %suitepath(all.globaltests)
553+
554+
--%test
555+
procedure very_long_procedure_name_valid_for_oracle_12_so_utplsql_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_ditit;
556+
END;';
557+
558+
--Act
559+
l_parsing_result := ut3.ut_annotations.parse_package_annotations(l_source);
560+
561+
--Assert
562+
l_ann_param := null;
563+
l_ann_param.val := 'Name of suite';
564+
l_expected.package_annotations('suite').params := cast( null as ut3.ut_annotations.tt_annotation_params);
565+
l_expected.package_annotations('displayname').params(1) := l_ann_param;
566+
567+
l_ann_param := null;
568+
l_ann_param.val := 'all.globaltests';
569+
l_expected.package_annotations('suitepath').params(1) := l_ann_param;
570+
571+
l_expected.procedure_annotations(1).name := 'very_long_procedure_name_valid_for_oracle_12_so_utplsql_should_allow_it_definitely_well_still_not_reached_128_but_wait_we_ditit';
572+
l_expected.procedure_annotations(1).annotations('test').params := cast( null as ut3.ut_annotations.tt_annotation_params);
573+
574+
check_annotation_parsing(l_expected, l_parsing_result);
575+
end;
576+
577+
513578
end test_annotations;
514579
/

test/ut_annotations/test_annotations.pks

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,11 @@ create or replace package test_annotations is
3636
--%test(Test space before annotation params)
3737
procedure test_space_Before_Annot_Params;
3838

39+
-- %test(Test annotations with windows newline)
40+
procedure test_windows_newline;
41+
42+
-- %test(Test annotation function with very long name)
43+
procedure test_annot_very_long_name;
44+
3945
end test_annotations;
4046
/

0 commit comments

Comments
 (0)