This commit is contained in:
Thomas Levine 2016-04-10 17:42:05 +00:00
parent 562489e795
commit 0feeb7233b

21
urchin
View File

@ -49,11 +49,9 @@
set -e set -e
# Delimiters # Delimiters
FS=$(printf '\u001C') LF="$(printf '\n')"
GS=$(printf '\u001D') HT="$(printf '\t')"
RS=$(printf '\u001E') DELIMITERS="[${LF}${HT}]"
US=$(printf '\u001F')
DELIMITERS="[${FS}${GS}${RS}${US}]"
# Urchin version number # Urchin version number
VERSION=0.0.0-master VERSION=0.0.0-master
@ -465,8 +463,7 @@ report_outcome() {
sorted_log_file=$(mktemp_file) sorted_log_file=$(mktemp_file)
cat "${log_file}" | LC_COLLATE=C sort > "${sorted_log_file}" cat "${log_file}" | LC_COLLATE=C sort > "${sorted_log_file}"
while read -d "${GS}" line; do while IFS="${HT}" read path the_shell result file_elapsed; do
read -d "${FS}" path the_shell result file_elapsed
abspath=${urchin_tmp}/${path} abspath=${urchin_tmp}/${path}
prevdir="${currentdir}" prevdir="${currentdir}"
@ -612,8 +609,8 @@ main() {
urchin_exit 11 urchin_exit 11
} }
if contains "${potential_test}" "${DELIMITERS}"; then if contains "${potential_test}" "${HT}"; then
echo Shell paths may not contain the delimiter characters. >&2 echo 'Shell paths may not contain tab characters (HT).' >&2
urchin_exit 11 urchin_exit 11
fi fi
@ -655,8 +652,8 @@ you don't need to quote the TEST_SHELL variable." >&2
urchin_exit;; urchin_exit;;
-*) urchin_help >&2 -*) urchin_help >&2
urchin_exit 11;; urchin_exit 11;;
*) if contains "${1}" "${DELIMITERS}"; then *) if contains "${1}" "${HT}"; then
echo 'Test file names may not contain delimiter characters.' >&2 echo 'Test file names may not contain tab characters (HT).' >&2
urchin_exit 11 urchin_exit 11
elif [ ! -e "${1}" ]; then elif [ ! -e "${1}" ]; then
echo "No such file or directory: '${1}'" >&2 echo "No such file or directory: '${1}'" >&2
@ -701,7 +698,7 @@ want to run urchin on that directory.' >&2
if $cycle_shell; then if $cycle_shell; then
for shell in $DEFAULT_SHELLS; do for shell in $DEFAULT_SHELLS; do
if command -v "${shell}" 1> /dev/null 2> /dev/null; then if command -v "${shell}" 1> /dev/null 2> /dev/null; then
shell_list="${shell}${FS}${shell_list}" shell_list="${shell}${HT}${shell_list}"
fi fi
done done
fi fi