Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong procedure executed on Windows platforms #7

Closed
PhilippSalvisberg opened this issue Jan 28, 2018 · 0 comments
Closed

Wrong procedure executed on Windows platforms #7

PhilippSalvisberg opened this issue Jan 28, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@PhilippSalvisberg
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant