Skip to content

Commit

Permalink
Merge pull request #15 from gjsjohnmurray/green-lion
Browse files Browse the repository at this point in the history
Don't encode %SYS namespace queryparam
  • Loading branch information
gjsjohnmurray authored Jun 10, 2023
2 parents a1577dc + ad10504 commit e941fd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commonRunTestsHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ export async function commonRunTestsHandler(controller: vscode.TestController, r
// When client-side mode is using 'objectscript.conn.docker-compose the first piece of 'authority' is blank,
if (authority.startsWith(":")) {
const namespace = authority.slice(1).toUpperCase();
query = `ns=${encodeURIComponent(namespace)}`;
// Arguably this should be `encodeURIComponent(namespace)` but vscode-objectscript extension doesn't decode the ns queryparam
// (see https://github.com/intersystems-community/vscode-objectscript/blob/978dcff2bafad6261919a13e0c69f025d6027c61/src/api/index.ts#L109)
// It presumably gets away with this because %-prefixed namespaces are rare, and the common one %SYS can't be mistaken for an encoded one.
query = `ns=${namespace}`;
authority = folder?.name || "";
}
const testRoot = vscode.Uri.from({ scheme: 'isfs', authority, path: `/.vscode/UnitTestRoot/${username}`, query });
Expand Down

0 comments on commit e941fd5

Please sign in to comment.