#!/usr/bin/perl -w
use strict;

use DebianNet ();
print "using $INC{'DebianNet.pm'}\n";

$DebianNet::inetdcf = "test.conf";
$DebianNet::verbose = 1;

my $base = "stream tcp nowait nobody file cmd";

# There's no need for DebianNet to set the umask because it doesn't affect
# chmod.  (Really it should be setting umask() before the open() instead
# of doing the chmod(), but I wanted to keep my changes minimal.)
umask 0777;

print "various uninit warnings\n";
DebianNet::add_service		"warn-add	$base";
DebianNet::enable_service	"warn-enable";
DebianNet::disable_service	"warn-disable";
DebianNet::remove_service	"warn-rm";

print "scan_entries() doesn't properly anchor search\n";
DebianNet::disable_service	"test-scan";

print "add_service() doesn't properly anchor search\n";
DebianNet::add_service("test-add $base", "TEST");

print "remove_service() doesn't properly anchor search\n";
DebianNet::remove_service("arg");
