Test-Command: jdupes -v | egrep 'jdupes [0-9]+\.[0-9]+'
Restrictions: superficial

Test-Command: jdupes debian/tests/files/ | grep list -C2 | grep -C2 list3

Test-Command: jdupes -m debian/tests/files/ | egrep 'duplicate.+occupying'

Test-Command: jdupes -M debian/tests/files/ | grep -C20 list |
              grep -C20 list3 | egrep 'duplicate.+occupying'

Test-Command: jdupes -r0 debian/tests/files/ | grep -a openlogo-100.png

Test-Command: jdupes -mr debian/tests/files/ | egrep 'duplicate.+occupying'

Test-Command: jdupes -ru debian/tests/files/ | grep -C10 list2 | grep -C10 list8

# testdir is a test directory provided by the upstream
Test-Command: jdupes -r testdir | grep -C200 tinydupe2 | grep -C200 file100

Test-Command: cp -a debian/tests/files/ $AUTOPKGTEST_TMP;
              jdupes -@1AHiprls $AUTOPKGTEST_TMP/files;
              tree -C $AUTOPKGTEST_TMP/ | grep -C50 list1| grep -C50 list7
Depends: @, tree:native

Test-Command: cp -a debian/tests/files/ $AUTOPKGTEST_TMP;
              jdupes -@1AHiprlsq $AUTOPKGTEST_TMP/files;
              tree -C $AUTOPKGTEST_TMP/ | grep -C50 list1| grep -C50 list7
Depends: @, tree:native

Test-Command: cp -a debian/tests/files/ $AUTOPKGTEST_TMP;
              jdupes -@rdNQzo time  -X size+:15 $AUTOPKGTEST_TMP/files;
              tree -C $AUTOPKGTEST_TMP/ | grep -C50 files
Depends: @, tree:native
Restrictions: allow-stderr

Test-Command: fsdeploy original-files;
              jdupes -r $AUTOPKGTEST_TMP/ 2>&1 | grep "No duplicates found"
Restrictions: allow-stderr
Depends: @, forensics-samples-files

# Test for #1030933
Test-Command: jdupes -r xyz-123 2>&1 | grep "No duplicates found"

# Test for #1063079
Test-Command: cp debian/tests/files2.tar.gz $AUTOPKGTEST_TMP;
              cd $AUTOPKGTEST_TMP;
              tar -xvf files2.tar.gz;
              rm files2.tar.gz;
              JD1=$(jdupes -r files2/2/ files2/3/ | grep files2 | wc -l);
              JD2=$(jdupes -ru files2/2/ files2/3/ | wc -l);
              JDSUM=$((JD1 + JD2));
              if [ "$JDSUM" -ne "1200" ]; then echo "Error: Invalid sum. Expected 1200, but received $JDSUM."; exit 1; fi

# Another test for #1063079
Test-Command: cp debian/tests/files3.tar.gz $AUTOPKGTEST_TMP;
              cd $AUTOPKGTEST_TMP;
              tar -xvf files3.tar.gz;
              rm files3.tar.gz;
              jdupes -ru 1 2 | egrep -C3 '1/test' | egrep '2/test'
