simplify_static_dir/t/zero-size-non-linkage.t

22 lines
459 B
Perl
Raw Normal View History

#!perl
use strict;
use warnings;
use Test::Simple
tests => 3;
use TestFunctions;
2023-07-20 17:41:07 +00:00
my $tarball_dir = prep_tar();
my $test_dir = "$tarball_dir/t/zero-size";
my @files = (
"$test_dir/empty1",
"$test_dir/empty2",
);
# Smoke test
2023-07-20 17:41:07 +00:00
ok !are_hardlinked(@files), 'not hardlinked before we start';
run_script($test_dir);
ok file_exists(@files), 'files were not accidentally deleted';
ok !are_hardlinked(@files), 'zero-sized files did not get hardlinked';