File: checksum_options.sh

package info (click to toggle)
rdfind 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 648 kB
  • sloc: cpp: 1,670; sh: 1,622; makefile: 32
file content (22 lines) | stat: -rwxr-xr-x 387 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# Test that selection of checksum works as expected.


set -e
. "$(dirname "$0")/common_funcs.sh"





for checksumtype in md5 sha1 sha256; do
  reset_teststate
  dbgecho "trying checksum $checksumtype"
  echo checksumtest >a
  echo checksumtest >b
  $rdfind  -checksum $checksumtype -deleteduplicates true a b
  [ -e a ]
  [ ! -e b ]
done

dbgecho "all is good in this test!"