simplify_static_dir/t/link-counting.t

21 lines
471 B
Perl
Raw Normal View History

#!perl
use strict;
use warnings;
2023-07-20 18:44:37 +00:00
use Test::More 'no_plan';
use TestFunctions;
2023-07-20 17:41:07 +00:00
my $tarball_dir = prep_tar();
my $test_dir = "$tarball_dir/t/link-counting";
my @files = (
"$test_dir/most-links",
"$test_dir/second-most-links",
);
# 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), 'files with existing links got hardlinked';