ACIL FM
Dark
Refresh
Current DIR:
/home/.cpan/build/AppConfig-1.71-0/t
/
home
.cpan
build
AppConfig-1.71-0
t
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
97-pod.t
289 B
chmod
View
DL
Edit
Rename
Delete
99_author.t
1.48 MB
chmod
View
DL
Edit
Rename
Delete
appconfig.t
1.84 MB
chmod
View
DL
Edit
Rename
Delete
args.t
2.32 MB
chmod
View
DL
Edit
Rename
Delete
block.t
2.14 MB
chmod
View
DL
Edit
Rename
Delete
cgi.t
1.94 MB
chmod
View
DL
Edit
Rename
Delete
compact.t
3.02 MB
chmod
View
DL
Edit
Rename
Delete
const.t
1.23 MB
chmod
View
DL
Edit
Rename
Delete
default.t
2.7 MB
chmod
View
DL
Edit
Rename
Delete
file.t
8.04 MB
chmod
View
DL
Edit
Rename
Delete
flag.t
2.13 MB
chmod
View
DL
Edit
Rename
Delete
getopt.t
2.15 MB
chmod
View
DL
Edit
Rename
Delete
multi.t
2.98 MB
chmod
View
DL
Edit
Rename
Delete
novars.t
2.18 MB
chmod
View
DL
Edit
Rename
Delete
state.t
4.71 MB
chmod
View
DL
Edit
Rename
Delete
sys.t
1.68 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/.cpan/build/AppConfig-1.71-0/t/novars.t
#!/usr/bin/perl -w #======================================================================== # # t/novars.t # # AppConfig::State test file testing negative setting of flag options # with "no<var>" syntax. # # Written by Andy Wardley <abw@cre.canon.co.uk> # # Copyright (C) 1998 Canon Research Centre Europe Ltd. # All Rights Reserved. # # This is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # #------------------------------------------------------------------------ # # TODO # # * test PEDANTIC option # #======================================================================== use strict; use vars qw($loaded); BEGIN { $| = 1; print "1..18\n"; } END { ok(0) unless $loaded; } my $ok_count = 1; sub ok { shift or print "not "; print "ok $ok_count\n"; ++$ok_count; } use AppConfig qw(:argcount); use AppConfig::State; $loaded = 1; ok(1); #------------------------------------------------------------------------ # create new AppConfig::State and AppConfig::Args objects # my $state = AppConfig::State->new( 'verbose' => { DEFAULT => 0, ARGCOUNT => ARGCOUNT_NONE, ALIAS => 'v', }, 'debug' => { ALIAS => 'dbg|d', # should default ARGCOUNT to ARGCOUNT_NONE }, 'age' => { ALIAS => 'a', ARGCOUNT => ARGCOUNT_ONE, }, 'nohope', ); #2: test the state got instantiated correctly ok( defined $state ); #3 - #6: update and check verbose ok( $state->verbose(1) ); ok( $state->verbose() == 1 ); ok( $state->noverbose(1) ); ok( $state->verbose() == 0 ); #7 - #15: update and check debug, also using aliases ok( $state->debug(1) ); ok( $state->debug() == 1 ); ok( $state->nodebug(1) ); ok( $state->debug() != 1 ); ok( $state->dbg(1) ); ok( $state->dbg() == 1 ); ok( $state->nodbg(1) ); ok( ! $state->dbg() ); ok( $state->nodbg() ); #16 - #17: attempt to update nohope and check it doesn't get interpreted # as "no - hope" ok( $state->nohope(1) ); ok( $state->nohope() == 1 ); #18: attempt to update noage which should fail because it doesn't # have an ARGCOUNT of ARGCOUNT_NONE $state->_ehandler( sub { } ); # disable errors ok( ! $state->noage(1) );
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply