File: noHOMEvar.t

package info (click to toggle)
libgetopt-argvfile-perl 1.11-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 260 kB
  • sloc: perl: 347; makefile: 2
file content (28 lines) | stat: -rw-r--r-- 522 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#
# This is no real test - we cannot test if we do *not* load
# a file from the users home directory, because we cannot
# write to there. (We could fake $ENV{HOME}, but that's just
# the variable we want to run without.)
#
# So, this test is just a reminder.
#

# set pragma
use strict;

# load test module
use Test::More qw(no_plan);

# load the module
use Getopt::ArgvFile qw(argvFile);

# prepare environment
delete $ENV{HOME};

# action!
argvFile(home=>1);

# perform check - @ARGV should be empty now
is(@ARGV, 0);