Navigation Menu

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

Testing aid: $factory->invoke_sub_in($loc, $args, $sub) #196

Open
hkoba opened this issue Apr 3, 2020 · 0 comments
Open

Testing aid: $factory->invoke_sub_in($loc, $args, $sub) #196

hkoba opened this issue Apr 3, 2020 · 0 comments
Assignees

Comments

@hkoba
Copy link
Owner

hkoba commented Apr 3, 2020

To write session related tests for yatt, we need to call entity functions like &yatt:session(); (or it's equivalent $entns->entity_session()) from them. Unfortunately, entity functions are usable only when written in *.yatt, *.ydo or action. And adapting to write such files is normally not a simple task for Perl programmers even who are already good at writing *.t.

So, let's add $factory->invoke_sub_in($location, $args, $sub), which prepares same runtime environment of Web and invoke the $sub. The $sub is invoked like $sub->($dirhandler, $connection).

@hkoba hkoba self-assigned this Apr 3, 2020
hkoba added a commit that referenced this issue Apr 3, 2020
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