Camelcade / Perl5-IDEA

Perl5 plugins for IntelliJ IDEA
Other
409 stars 75 forks source link

Test2 Support #2063

Open elcamlost opened 5 years ago

elcamlost commented 5 years ago

There is Test2 testing framework. Do you have any plans to support it?

Two main issues for now - exported $CLASS and CLASS() are unresolved

use Test2::V0 -target 'My::Class';
is $CLASS, 'My::Class', 'class is ok';
is CLASS(), 'My::Class', 'class is ok';

Also all functions exported by use Test2::V0 are unresolved. They are exported into test with Importer module and available via @Test2::V0::EXPORT var.

hurricup commented 5 years ago

This is more like two issues. Resolve and test support. Last one is more like here https://github.com/Camelcade/TAP-Formatter-Camelcade/issues/6 Haven't chance to investigate yet.

jbakerdev commented 3 years ago

@hurricup i'm messing around with this some, but having trouble getting started... for my own dev/testing, can you recommend a way for me to add a test template that will use yath instead of prove?

Is this the right place to be looking? https://github.com/Camelcade/Perl5-IDEA/tree/62f2fb710fc8b57ed3fdde17e96150e0b49f1205/plugin/core/src/com/perl5/lang/perl/idea/run

If i clone the 'prove' directory, and rename it to 'yath', do some search/replace, will that get me close?

hurricup commented 3 years ago

For testing purposes you may change https://github.com/Camelcade/Perl5-IDEA/blob/62f2fb710fc8b57ed3fdde17e96150e0b49f1205/plugin/core/src/com/perl5/lang/perl/idea/run/prove/PerlTestRunConfiguration.java#L128 from prove command line to the yath

jbakerdev commented 3 years ago

@hurricup FYI, MaxMind has open-sourced their Test2 formatter for TeamCity (https://github.com/maxmind/Test2-Formatter-TeamCity)

Seems like a step in the right direction. What are your thoughts on implementing this? A user-selectable option in the current "Perl5 Test" configuration template to use either prove or yath? Or maybe a separate configuration template?

hurricup commented 3 years ago

I'll check it, thanks