aboutsummaryrefslogtreecommitdiff
path: root/tests/install.test
blob: b1113c0f1c976191c14893fe1e52f85fc1b339ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

# TODO: fill this out.
# TODO: "make install" means something else, so no test_install, only callable
# from "make tests"...

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

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

dd if=/dev/urandom of=random bs=64 count=1 2> /dev/null
testing "install -D exists" \
  "mkdir -p a; touch a/b; install -D random a/b && cmp random a/b && echo yes" \
  "yes\n" "" ""
rm -rf a random
testing "install -D -t creates directory" \
  "touch a; install -Dt b a && echo yes" \
  "yes\n" "" ""
rm -rf a b