File tree Expand file tree Collapse file tree 4 files changed +45
-4
lines changed
test/ut3_user/expectations Expand file tree Collapse file tree 4 files changed +45
-4
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ if [[ "${TRAVIS_JOB_NUMBER}" =~ \.2$ ]]; then
2323 time " $SQLCLI " sys/$ORACLE_PWD @//$CONNECTION_STR AS SYSDBA << -SQL
2424 set feedback off
2525 set verify off
26+ whenever sqlerror exit failure rollback
2627
2728 @uninstall_all.sql $UT3_OWNER
2829 whenever sqlerror exit failure rollback
Original file line number Diff line number Diff line change 1+ set echo off
2+ set serverout on
3+ declare
4+ procedure drop_if_exists(a_object_type varchar2, a_object_name varchar2) is
5+ l_count integer;
6+ begin
7+ select count(1)
8+ into l_count
9+ from all_objects
10+ where owner = sys_context('USERENV','CURRENT_SCHEMA')
11+ and object_type = a_object_type
12+ and object_name = a_object_name;
13+ if l_count > 0 then
14+ execute immediate 'drop '||a_object_type||' '||a_object_name;
15+ dbms_output.put_line(initcap(a_object_type)||' '||a_object_name||' dropped.');
16+ else
17+ dbms_output.put_line(initcap(a_object_type)||' '||a_object_name||' was not dropped, '||lower(a_object_type)||' does not exist.');
18+ end if;
19+ end;
20+ begin
21+ drop_if_exists('TRIGGER', 'UT_TRIGGER_ANNOTATION_PARSING');
22+ drop_if_exists('SYNONYM','UT3_TRIGGER_ALIVE');
23+ end;
24+ /
125set echo on
226
3- drop trigger ut_trigger_annotation_parsing;
4-
5- drop synonym ut3_trigger_alive;
6-
727drop synonym be_between;
828
929drop synonym have_count;
Original file line number Diff line number Diff line change @@ -2843,5 +2843,22 @@ Check the query and data for errors.';
28432843 ut3.ut.expect(v_actual).to_equal(v_expected).exclude('ID');
28442844 ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);
28452845 end;
2846+
2847+ procedure compare_long_column_names is
2848+ l_actual sys_refcursor;
2849+ l_expected sys_refcursor;
2850+ begin
2851+ -- populate actual
2852+ open l_actual for
2853+ select rownum as id, '1' some_column_with_a_pretty_long_enough_name from dual;
2854+
2855+ open l_expected for
2856+ select rownum as id, '1' some_column_with_a_pretty_long_enough_name from dual;
2857+
2858+ ut3.ut.expect(l_actual).to_equal(l_expected).include('ID,SOME_COLUMN_WITH_A_PRETTY_LONG_ENOUGH_NAME').join_by('ID');
2859+ --Assert
2860+ ut.expect(ut3_tester_helper.main_helper.get_failed_expectations_num).to_equal(0);
2861+ end;
2862+
28462863end;
28472864/
Original file line number Diff line number Diff line change @@ -462,5 +462,8 @@ create or replace package test_expectations_cursor is
462462 --%test( Mixed column order exclusion )
463463 procedure uc_columns_exclude;
464464
465+ --%test(Compares cursors with long column names - Issue #952 )
466+ procedure compare_long_column_names;
467+
465468end;
466469/
You can’t perform that action at this time.
0 commit comments