aboutsummaryrefslogtreecommitdiff
path: root/tests/tar.test
blob: 31aee386858ff6af583e0db52c75cc552bfc287f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

[ -f testing.sh ] && . testing.sh

#testing "name" "command" "result" "infile" "stdin"

TARSUM='--owner root --group root | head -c $((3*512)) | sha1sum | sed "s/ .*//"'
touch -t 198001010101 file
testing "create file" "tar c file $TARSUM" \
  "d551292408833aa5e9db32c0d14d7f32e7e96882\n" "" ""
mkdir walrus
touch -t 198001010101 dir
testing "create dir" "tar c dir $TARSUM" \
  "c4e630d9c89f4f20d603a6f71ff4410ab56fe965\n" "" ""