{"id":17891345,"url":"https://github.com/cside/test-base-subtest","last_synced_at":"2025-04-03T03:22:32.651Z","repository":{"id":13278886,"uuid":"15964527","full_name":"Cside/Test-Base-SubTest","owner":"Cside","description":null,"archived":false,"fork":false,"pushed_at":"2014-01-24T12:33:02.000Z","size":184,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T17:23:22.440Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cside.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-16T10:15:21.000Z","updated_at":"2014-09-09T15:21:30.000Z","dependencies_parsed_at":"2022-09-18T06:20:37.383Z","dependency_job_id":null,"html_url":"https://github.com/Cside/Test-Base-SubTest","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2FTest-Base-SubTest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2FTest-Base-SubTest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2FTest-Base-SubTest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cside%2FTest-Base-SubTest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cside","download_url":"https://codeload.github.com/Cside/Test-Base-SubTest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246928697,"owners_count":20856331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T14:16:40.648Z","updated_at":"2025-04-03T03:22:32.626Z","avatar_url":"https://github.com/Cside.png","language":"Perl","readme":"# NAME\n\nTest::Base::SubTest - Enables Test::Base to use subtest\n\n# SYNOPSIS\n\n    use Test::Base::SubTest;\n\n    filters { input =\u003e [qw/eval/] };\n    run {\n        my $block = shift;\n        is $block-\u003einput, $block-\u003eexpected, $block-\u003ename;\n    };\n    done_testing;\n\n    __DATA__\n\n    ### subtest 1\n        === test 1-1\n        --- input:    4*2\n        --- expected: 8\n\n        === test 1-2\n        --- input :   3*3\n        --- expected: 9\n\n    ### subtest 2\n        === test 2-1\n        --- input:    4*3\n        --- expected: 12\n\n\u003cdiv\u003e\u003cimg src=\"http://cdn-ak.f.st-hatena.com/images/fotolife/C/Cside/20140116/20140116204246.png?1389872580\"\u003e\u003c/div\u003e\n\n# DESCRIPTION\n\nTest::Base::SubTest is a extension of [Test::Base::Less](https://metacpan.org/pod/Test::Base::Less).\n\n\"\\#\\#\\# TEST NAME\" is a delimiter of a subtest. Indentaion is necessary.\n\n# FUNCTIONS\n\nThis module exports all Test::More's exportable functions, and following functions:\n\n- filters(+{ } : HashRef);\n\n        filters {\n            input =\u003e [qw/eval/],\n        };\n\n    Set a filter for the section name.\n\n- run(\\\\\u0026subroutine)\n\n        run {\n            my $block = shift;\n            is $block-\u003einput, $block-\u003eexpected, $block-\u003ename;\n        };\n\n    Calls the sub for each block. It passes the current block object to the subroutine.\n\n- run\\_is(\\[data\\_name1, data\\_name2\\])\n\n        run_is input =\u003e 'expected';\n- run\\_is\\_deeply(\\[data\\_name1, data\\_name2\\])\n- register\\_filter($name: Str, $code: CodeRef)\n\n    Register a filter for $name using $code.\n\n# DEFAULT FILTERS\n\nThis module provides only few filters. If you want to add more filters, pull-reqs welcome.\n(I only merge a patch using no depended modules)\n\n- eval\n\n    eval() the code.\n\n- chomp\n\n    `chomp()` the arguments.\n\n- uc\n\n    `uc()` the arguments.\n\n- trim\n\n    Remove extra blank lines from the beginning and end of the data. This\n    allows you to visually separate your test data with blank lines.\n\n# REGISTER YOUR OWN FILTER\n\nYou can register your own filter by following form:\n\n    use Digest::MD5 qw/md5_hex/;\n    Test::Base::Less::register_filter(md5_hex =\u003e \\\u0026md5_hex);\n\n# USE CODEREF AS FILTER\n\nYou can use a CodeRef as filter.\n\n    use Digest::MD5 qw/md5_hex/;\n    filters {\n        input =\u003e [\\\u0026md5_hex],\n    };\n\n# SEE ALSO\n\nMost of code is taken from [Test::Base::Less](https://metacpan.org/pod/Test::Base::Less). Thank you very match, tokuhirom.\n\n# AUTHOR\n\nHiroki Honda \u003ccside.story@gmail.com\u003e\n\n# LICENSE\n\nCopyright (C) Hiroki Honda\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcside%2Ftest-base-subtest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcside%2Ftest-base-subtest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcside%2Ftest-base-subtest/lists"}