mirror of
https://codeberg.org/h3xx/simplify_static_dir
synced 2024-08-14 23:57:24 +00:00
22 lines
499 B
Perl
22 lines
499 B
Perl
# vi: et sts=4 sw=4 ts=4
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Test::Simple
|
|
tests => 3;
|
|
|
|
use TestFunctions;
|
|
|
|
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
|
|
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';
|