Help language development. Donate to The Perl Foundation
Pod::Test::Code - Tests code blocks from pod
# Your test: use Pod::Test::Code; test-code-snippets; # It will test all code blocks from all modules # declared as `provides` on your META6.json # or test-code-snippets "My::Module::To::Be::Tested";
On your docs (please, take a look at this pod):
is 1, 1, "This seems to be working"; # Pod is using: # =begin code :lang<raku>
note "bla"; # Pod is using: # =begin code :lives-ok("testing lives ok") :lang<raku>
die "bla"; # Pod is using: # =begin code :dies-ok("testing dies ok") :lang<raku>
note "bla"; # Pod is using: # =begin code :subtest("blablabla") :lang<raku>
{ "bla": "ble" }
is "test.json".IO.slurp.chomp, q|{ "bla": "ble" }|;
print 42 # OUTPUT: 42
say 42; say 13; say 3.14; # OUTPUT: # 42 # 13 # 3.14
Pod::Test::Code is a way to test your pod's code
Fernando Correa de Oliveira [email protected]
Copyright 2021 Fernando Correa de Oliveira
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.