From a16e900ed6d82ff9dfcbfe44bc84dbdef88d757c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Murias?= Date: Wed, 27 Jun 2018 10:31:25 +0200 Subject: [PATCH] [truffle] Simple &ok and &plan before we can run better ones --- nqp-truffle.nqp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nqp-truffle.nqp b/nqp-truffle.nqp index 15e7a01a6e..096ee19b0e 100644 --- a/nqp-truffle.nqp +++ b/nqp-truffle.nqp @@ -389,12 +389,23 @@ class QAST::TruffleCompiler { my $mini_setting := ' +sub print($arg) { + nqp::print($arg); +} sub say($arg) { nqp::say($arg); } -sub print($arg) { - nqp::print($arg); +sub plan($quantity) { + nqp::say("1..$quantity"); +} + +sub ok($condition) { + if $condition { + nqp::say("ok"); + } else { + nqp::say("not ok"); + } } ';