| 1 |
package.path = '../src/?.lua;' .. package.path |
| 2 |
local tap = require 'tapered' |
| 3 |
|
| 4 |
--- like and unlike |
| 5 |
-- like(string, pattern, [msg]) tests if the pattern matches the string |
| 6 |
-- unlike(string, pattern, [msg]) tests if the pattern does not match the string |
| 7 |
tap.like('sat', 'sat', "ok - like('sat', 'sat')") |
| 8 |
tap.like('sat', 'bbb', "not ok - like('sat', 'bbb')") |
| 9 |
tap.unlike('sat', 'q', "ok - unlike('sat', 'q')") |
| 10 |
tap.unlike('q', 'q', "not ok - unlike('q', 'q')") |
| 11 |
tap.like(' sat', '%s+sat', "ok - like(' sat', '%s+sat')") |
| 12 |
tap.like('934', '%d%d%d', "ok - like('934', '%d%d%d')") |
| 13 |
tap.like('934', '%d%d', "ok - like('934', '%d%d')") |
| 14 |
tap.like('934', '%d%s', "not ok - like('934', '%d%s')") |
| 15 |
tap.unlike('934', '%d%s', "ok - unlike('934', '%d%s')") |
| 16 |
tap.done() |