Closed
Description
In Windows platforms the cursor position is not calculated correctly and therefore the wrong test procedure might be called, when invoking utPLSQL from the PL/SQL editor.
Example code:
create or replace package test_expect_not_to_be_null
is
--%suite(expectations - not_to_be_null)
--%suitepath(utplsql.core.expectations.unary)
--%aftereach
procedure cleanup_expectations;
--%beforeall
procedure create_types;
--%afterall
procedure drop_types;
--%test(Gives success for not null blob)
procedure blob_not_null;
--%test(Gives success for blob with length 0)
procedure blob_0_length;
-- ...
end test_expect_not_to_be_null;
/
If you position the cursor on line 13, column 26 (end of line procedure drop_types;
) and call Run utPLSQL test
then the utPLSQL path test_expect_not_to_be_null.drop_types
is executed instead of test_expect_not_to_be_null.blob_not_null
.
The reason for this wrong behaviour is, that an end-of-line is calculated as a single position in the underlying Swing component of SQL Developer, regardless of the OS platform. But the utPLSQL extensions calculates two positions for an end-of-line on Windows (CR/LF). This is a bug.