1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 10:45:40 -04:00
perlbuut/t/arg-plugin.t

23 lines
635 B
Perl

#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use Test::More;
use lib::relative './lib', '../lib', '..';
use t::simple_plugin;
use Encode qw/encode/;
load_plugin("arg");
check("&n", "perlbot", ['FOO'], "empty but valid");
check("&a", "", ['FOO'], "macro args"); # this one is difficult to test for, it really gets the arguments to the parent macro
check("", "", ['FOO'], "empty arguments, needs better check");
check("&h", "irc.client.example.com", ['FOO'], "host");
check("&c", "##NULL", ['FOO'], "channel");
check("&o", 0, ['FOO'], "is op?");
check("&s", "irc.server.example.com", ['FOO'], "server");
done_testing();