Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ciavash/t
Raku module for writing test assertions which output good test descriptions and error messages
https://github.com/ciavash/t
assertion assertions library module raku raku-module rakulang slang testing
Last synced: 3 months ago
JSON representation
Raku module for writing test assertions which output good test descriptions and error messages
- Host: GitHub
- URL: https://github.com/ciavash/t
- Owner: CIAvash
- License: lgpl-3.0
- Archived: true
- Created: 2022-02-13T06:51:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-23T11:26:32.000Z (over 2 years ago)
- Last Synced: 2024-09-27T06:23:11.948Z (3 months ago)
- Topics: assertion, assertions, library, module, raku, raku-module, rakulang, slang, testing
- Language: Raku
- Homepage: https://codeberg.org/CIAvash/T
- Size: 25.4 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
NAME
====T - An easy way of writing test assertions which output good test descriptions and error messages
DESCRIPTION
===========T is a [Raku](https://www.raku-lang.ir/en/) 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 ` `.
Goals of the module:
- Write less but more readable test code
- Get a useful test description and failure messageSYNOPSIS
========```raku
use T:auth;t 4 == 4;
=output ok 1 - 4 == 4t $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:'
# got: "something else"
```INSTALLATION
============You need to have [Raku](https://www.raku-lang.ir/en) and [zef](https://github.com/ugexe/zef), then run:
```console
zef install --/test "T:auth"
```or if you have cloned the repo:
```console
zef install .
```TESTING
=======
```console
prove6 -I. -v
```
or:
```console
prove -ve 'raku -I.' --ext rakutest
```REPOSITORY
==========[https://codeberg.org/CIAvash/T/](https://codeberg.org/CIAvash/T/)
BUG
===[https://codeberg.org/CIAvash/T/issues](https://codeberg.org/CIAvash/T/issues)
AUTHOR
======Siavash Askari Nasr - [https://siavash.askari-nasr.com](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 .