File: 05-bad-arg-name.t

package info (click to toggle)
libgetopt-complete-perl 0.26-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 504 kB
  • sloc: perl: 1,068; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 298 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
require Getopt::Complete;
use Test::More tests => 1;
my $args = Getopt::Complete::Args->new(
    options => Getopt::Complete::Options->new('foo!' => undef),
    argv => ['--bar']
   );
ok(scalar(grep { /Unknown option: bar/ } $args->errors), "detected an error when a nonsense argumetn is used");