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

QUnit does not support injections into binary modules #3382

Closed
davidnich opened this issue May 9, 2019 · 1 comment
Closed

QUnit does not support injections into binary modules #3382

davidnich opened this issue May 9, 2019 · 1 comment
Assignees
Milestone

Comments

@davidnich
Copy link
Contributor

No description provided.

@davidnich davidnich added this to the 0.9.3 milestone May 9, 2019
@davidnich davidnich self-assigned this May 9, 2019
@davidnich
Copy link
Contributor Author

Here is an example of how to do a dependency injection test with a binary module:

#!/usr/bin/env qore

%new-style
%strict-args
%require-types
%allow-injection
%no-child-restrictions

class MySFTPClient {
    constructor(string str) {
        printf("hello\n");
    }
}

load_module("ssh2");

Program p1(PO_NO_SYSTEM_API | PO_NO_USER_API | PO_NEW_STYLE | PO_REQUIRE_TYPES | PO_STRICT_ARGS | PO_ALLOW_INJECTION | PO_NO_CHILD_PO_RESTRICTIONS);
p1.importClass("MySFTPClient", "Qore::SSH2::SFTPClient", True);
p1.importSystemApi();
p1.parse("SFTPClient sftp(\"hi\");", "");
p1.run();

Reviewing QUnit's support for dependency injections, we may want to repurpose this issue to address shortcomings in usability and documentation of the current dependency injection support in QUnit, as it doesn't look very usable in its current form.

davidnich added a commit that referenced this issue Aug 17, 2019
davidnich added a commit that referenced this issue Aug 17, 2019
* refs #3382 fixed dependency injection APIs in QUnit

* refs #3382 only set cmake policies if they are supported

* refs #3382 fixed case sensitive cmake policy cmd

* refs #3382 fixed typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant