install.test 540 B

12345678910111213141516171819
  1. #!/bin/bash
  2. # TODO: fill this out.
  3. # TODO: "make install" means something else, so no test_install, only callable
  4. # from "make tests"...
  5. [ -f testing.sh ] && . testing.sh
  6. #testing "name" "command" "result" "infile" "stdin"
  7. dd if=/dev/urandom of=random bs=64 count=1 2> /dev/null
  8. testing "install -D exists" \
  9. "mkdir -p a; touch a/b; install -D random a/b && cmp random a/b && echo yes" \
  10. "yes\n" "" ""
  11. rm -rf a random
  12. testing "install -D -t creates directory" \
  13. "touch a; install -Dt b a && echo yes" \
  14. "yes\n" "" ""
  15. rm -rf a b