2
0
Fork
You've already forked T
0
Raku module for writing test assertions which output good test descriptions and error messages
  • Raku 100%
Siavash Askari Nasr 8f8facc056
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Add woodpecker CI
2022年07月23日 15:55:00 +04:30
lib Change domain names 2022年07月23日 15:52:12 +04:30
t Initial commit 2022年02月13日 10:20:58 +03:30
.gitignore Initial commit 2022年02月13日 10:20:58 +03:30
.woodpecker.yml Add woodpecker CI 2022年07月23日 15:55:00 +04:30
COPYING Initial commit 2022年02月13日 10:20:58 +03:30
COPYING.LESSER Initial commit 2022年02月13日 10:20:58 +03:30
META6.json Bump version to v0.1.2 2022年07月23日 15:53:38 +04:30
README.md Change domain names 2022年07月23日 15:52:12 +04:30

NAME

T - An easy way of writing test assertions which output good test descriptions and error messages

DESCRIPTION

T is a Raku module for writing test assertions which output good test descriptions and error messages.

It provides the t keyword for writing test assertions which takes an expression of form <got> <infix> <expected>.

Goals of the module:

  • Write less but more readable test code
  • Get a useful test description and failure message

SYNOPSIS

use T:auth<zef:CIAash>;
t 4 == 4;
=output ok 1 - 4 == 4
t $my_great_module.return('something') eq 'something';
=output ok 2 - $my_great_module.return('something') eq 'something'
t $my_great_module.return('something else') eq 'something';
=output not ok 3 - $my_great_module.return('something else') eq 'something'
# Failed test '$my_great_module.return('something else') eq 'something''
# at ... line ...
# expected: "something"
# matcher: 'infix:<eq>'
# got: "something else"

INSTALLATION

You need to have Raku and zef, then run:

zef install --/test "T:auth<zef:CIAvash>"

or if you have cloned the repo:

zef install .

TESTING

prove6 -I. -v

or:

prove -ve 'raku -I.' --ext rakutest

REPOSITORY

https://codeberg.org/CIAvash/T/

BUG

https://codeberg.org/CIAvash/T/issues

AUTHOR

Siavash Askari Nasr - https://siavash.askari-nasr.com

COPYRIGHT

Copyright © 2022 Siavash Askari Nasr

LICENSE

This file is part of T.

T is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at yoption) any later version.

T is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with T. If not, see http://www.gnu.org/licenses/.