GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use of fullstop character in --%context(<name>) · Issue #966 · utPLSQL/utPLSQL

Use of fullstop character in --%context(<name>) #966

New issue
Copy link
New issue
Copy link
Closed
#1013
Closed
Use of fullstop character in --%context(<name>)#966
#1013
Copy link
Labels
bug

Description

@BrianGubbins
BrianGubbins
opened on Jul 2, 2019
Issue body actions

Describe the bug

Using a full stop character in --%context(<name>) will cause all other contexts in the suite to be executed under an entirely different suite as seen in the output section below. The reason for this I believe is because the way a context name is interpreted as a path to allow users to execute specific contexts.

Version Info

utPLSQL: v3.1.6.2735
SQL Developer: 19.1.0.094

To Reproduce

1. Create tests

create or replace package test_context_bug_1 is

  --%suite

  --%context(suite_1 context_1)

    --%test
    procedure test1;

  --%endcontext
  
  --%context(suite_1 context_2)

    --%test
    procedure test2;

  --%endcontext

end;
/

create or replace package body test_context_bug_1 is

  procedure test1 is
  begin
    ut.expect( 1 ).to_equal( 1 );
  end;

  procedure test2 is
  begin
    ut.expect( 1 ).to_equal( 1 );
  end;

end;
/

create or replace package test_context_bug_2 is

  --%suite
  
  --%context(suite_2 context_1)
  
    --%test
    procedure test1;

  --%endcontext
  
  --%context(suite_2 context_2)

    --%test
    procedure test2;

  --%endcontext

end;
/

create or replace package body test_context_bug_2 is

  procedure test1 is
  begin
    ut.expect( 1 ).to_equal( 1 );
  end;

  procedure test2 is
  begin
    ut.expect( 1 ).to_equal( 1 );
  end;

end;
/

2. Add a full stop in a context name

--%context(suite_2. context_2)  

3. Run tests

SET SERVEROUTPUT ON SIZE UNLIMITED
EXECUTE ut.run(); 

Outputs

Expected output:

test_context_bug_1
  suite_1 context_2
    test2 [.003 sec]
  suite_1 context_1
    test1 [.002 sec]
 
test_context_bug_2
  suite_2 context_2
    test2 [.002 sec]
  suite_2 context_1
    test1 [.002 sec]
 
Finished in .013272 seconds
4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
PL/SQL procedure successfully completed.

Actual output:

test_context_bug_1
  suite_2 context_1
    test1 [.003 sec]
  suite_1 context_2
    test2 [.001 sec]
  suite_1 context_1
    test1 [.001 sec]
 
test_context_bug_2
  suite_2. context_2
    test2 [.003 sec]
 
Finished in .01466 seconds
4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)
PL/SQL procedure successfully completed.

Expected behavior

When a full stop is present in --%context(<name>) the other contexts in the suite shouldn't be executed under another suite.

Activity

  1. jgebal
    added
    bug
    on Jul 2, 2019
  2. jgebal
    closed this as completedin #1013on Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.