| #!/bin/bash |
| set -eu |
| THIS="$(realpath "$0")" |
| THISDIR="$(dirname "${THIS}")" |
| SUT="$(dirname "${THISDIR}")/makeself.sh" |
| |
| testWhiteSpace() { |
| local archive_dir="$(mktemp -dt archive_dir.XXXXXX)" |
| ( |
| cd "${archive_dir}" |
| touch "$(printf "_\x09_character_tabulation.txt")" |
| touch "$(printf "_\x0b_line_tabulation.txt")" |
| touch "$(printf "_\x0c_form_feed.txt")" |
| touch "$(printf "_\x0d_carriage_return.txt")" |
| touch "$(printf "_\x20_space:.txt")" |
| ) |
| local file_name="$(mktemp -t file_name.XXXXXX)" |
| "${SUT}" "${archive_dir}" "${file_name}" "white space test" "ls -lah ." |
| assertEquals $? 0 |
| rm -rf "${archive_dir}" "${file_name}" |
| } |
| |
| # Load and run shUnit2. |
| source "./shunit2/shunit2" |