Title: Use of fullstop character in --%context(
Open Graph Title: Use of fullstop character in --%context(
X Title: Use of fullstop character in --%context(
Description: Describe the bug Using a full stop character in --%context(
Open Graph Description: Describe the bug Using a full stop character in --%context(
X Description: 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 be...
Opengraph URL: https://github.com/utPLSQL/utPLSQL/issues/966
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use of fullstop character in --%context(\u003cname\u003e)","articleBody":"### Describe the bug\r\nUsing a full stop character in ```--%context(\u003cname\u003e) ``` 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. \r\n\r\n### Version Info\r\n**utPLSQL:** v3.1.6.2735\r\n**SQL Developer:** 19.1.0.094\r\n\r\n### To Reproduce\r\n**1. Create tests**\r\n```sql\r\ncreate or replace package test_context_bug_1 is\r\n\r\n --%suite\r\n\r\n --%context(suite_1 context_1)\r\n\r\n --%test\r\n procedure test1;\r\n\r\n --%endcontext\r\n \r\n --%context(suite_1 context_2)\r\n\r\n --%test\r\n procedure test2;\r\n\r\n --%endcontext\r\n\r\nend;\r\n/\r\n\r\ncreate or replace package body test_context_bug_1 is\r\n\r\n procedure test1 is\r\n begin\r\n ut.expect( 1 ).to_equal( 1 );\r\n end;\r\n\r\n procedure test2 is\r\n begin\r\n ut.expect( 1 ).to_equal( 1 );\r\n end;\r\n\r\nend;\r\n/\r\n\r\ncreate or replace package test_context_bug_2 is\r\n\r\n --%suite\r\n \r\n --%context(suite_2 context_1)\r\n \r\n --%test\r\n procedure test1;\r\n\r\n --%endcontext\r\n \r\n --%context(suite_2 context_2)\r\n\r\n --%test\r\n procedure test2;\r\n\r\n --%endcontext\r\n\r\nend;\r\n/\r\n\r\ncreate or replace package body test_context_bug_2 is\r\n\r\n procedure test1 is\r\n begin\r\n ut.expect( 1 ).to_equal( 1 );\r\n end;\r\n\r\n procedure test2 is\r\n begin\r\n ut.expect( 1 ).to_equal( 1 );\r\n end;\r\n\r\nend;\r\n/\r\n ```\r\n**2. Add a full stop in a context name**\r\n``` sql \r\n--%context(suite_2. context_2) \r\n```\r\n\r\n**3. Run tests**\r\n``` sql\r\nSET SERVEROUTPUT ON SIZE UNLIMITED\r\nEXECUTE ut.run(); \r\n```\r\n\r\n\r\n### Outputs\r\n**Expected output:**\r\n```\r\ntest_context_bug_1\r\n suite_1 context_2\r\n test2 [.003 sec]\r\n suite_1 context_1\r\n test1 [.002 sec]\r\n \r\ntest_context_bug_2\r\n suite_2 context_2\r\n test2 [.002 sec]\r\n suite_2 context_1\r\n test1 [.002 sec]\r\n \r\nFinished in .013272 seconds\r\n4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)\r\nPL/SQL procedure successfully completed.\r\n```\r\n\r\n**Actual output:**\r\n```\r\ntest_context_bug_1\r\n suite_2 context_1\r\n test1 [.003 sec]\r\n suite_1 context_2\r\n test2 [.001 sec]\r\n suite_1 context_1\r\n test1 [.001 sec]\r\n \r\ntest_context_bug_2\r\n suite_2. context_2\r\n test2 [.003 sec]\r\n \r\nFinished in .01466 seconds\r\n4 tests, 0 failed, 0 errored, 0 disabled, 0 warning(s)\r\nPL/SQL procedure successfully completed.\r\n```\r\n\r\n### Expected behavior\r\nWhen a full stop is present in ```--%context(\u003cname\u003e) ``` the other contexts in the suite shouldn't be executed under another suite.\r\n","author":{"url":"https://github.com/BrianGubbins","@type":"Person","name":"BrianGubbins"},"datePublished":"2019-07-02T17:39:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/966/utPLSQL/issues/966"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:defcfc11-3e0c-5f26-208f-9519b00d50b9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B90A:1AFE09:68B69:95ECD:6A63606F |
| html-safe-nonce | 4a38012524b4e6dc52b67aac85db959d70ccd5ca341d5b795efec79fbcf94d6d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTBBOjFBRkUwOTo2OEI2OTo5NUVDRDo2QTYzNjA2RiIsInZpc2l0b3JfaWQiOiI2MjA3NjUyOTYwNjgyNTk4NTExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 78816d1123508753758e6ac383fbc4f6fdedf2b2e82b80acea5f1aadc59d231a |
| hovercard-subject-tag | issue:463354104 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/utPLSQL/utPLSQL/966/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c529bcf953fce0e386291d27dced4c4e1791949c71f3985e5a2bf1aef049dff4/utPLSQL/utPLSQL/issues/966 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c529bcf953fce0e386291d27dced4c4e1791949c71f3985e5a2bf1aef049dff4/utPLSQL/utPLSQL/issues/966 |
| og:image:alt | Describe the bug Using a full stop character in --%context( |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | BrianGubbins |
| hostname | github.com |
| expected-hostname | github.com |
| None | 59e55daad7174ca59d63c6974d58276ccb5477442e550bebb3c035e1bef11c94 |
| turbo-cache-control | no-preview |
| go-import | github.com/utPLSQL/utPLSQL git https://github.com/utPLSQL/utPLSQL.git |
| octolytics-dimension-user_id | 15661281 |
| octolytics-dimension-user_login | utPLSQL |
| octolytics-dimension-repository_id | 50728220 |
| octolytics-dimension-repository_nwo | utPLSQL/utPLSQL |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 50728220 |
| octolytics-dimension-repository_network_root_nwo | utPLSQL/utPLSQL |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 71b1218de2f2ab29c4d5ce72568e68e2c56044c6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width