Skip to content

Commit

Permalink
less reliance on gnu tools
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Colvin committed Jun 28, 2017
1 parent 01db278 commit 893ee34
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions test/4-describe-data-3-zero-delim.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if ! $DUB describe --compiler=$DC --data-0 --data-list \
die 'Printing null-delimited list-style project data failed!'
fi

if ! diff -Z "$temp_file_normal" "$temp_file_zero_delim"; then
if ! diff -B "$temp_file_normal" "$temp_file_zero_delim"; then
die 'The null-delimited list-style project data did not match the expected output!'
fi

Expand All @@ -86,7 +86,7 @@ if ! $DUB describe --compiler=$DC --data-0 --import-paths \
die 'Printing null-delimited --import-paths failed!'
fi

if ! diff -Z -B "$temp_file_normal" "$temp_file_zero_delim"; then
if ! diff -B "$temp_file_normal" "$temp_file_zero_delim"; then
die 'The null-delimited --import-paths data did not match the expected output!'
fi

Expand All @@ -103,11 +103,12 @@ if ! $DUB describe --compiler=$DC --data=versions \
fi

if ! $DUB describe --compiler=$DC --data-0 --data=versions \
| xargs -0 printf "%s " > "$temp_file_zero_delim"; then
| xargs -0 printf "%s " | sed 's/ $/\
/' > "$temp_file_zero_delim"; then
die 'Printing null-delimited dmd-style --data=versions failed!'
fi

if ! diff -Z "$temp_file_normal" "$temp_file_zero_delim"; then
if ! diff -B "$temp_file_normal" "$temp_file_zero_delim"; then
die 'The null-delimited dmd-style --data=versions did not match the expected output!'
fi

Expand All @@ -118,10 +119,10 @@ if ! $DUB describe --compiler=$DC --data=source-files \
fi

if ! $DUB describe --compiler=$DC --data-0 --data=source-files \
| xargs -0 printf "'%s' " > "$temp_file_zero_delim"; then
| xargs -0 printf "'%s' " | sed 's/ $//' > "$temp_file_zero_delim"; then
die 'Printing null-delimited dmd-style --data=source-files failed!'
fi

if ! diff -Z "$temp_file_normal" "$temp_file_zero_delim"; then
if ! diff -B "$temp_file_normal" "$temp_file_zero_delim"; then
die 'The null-delimited dmd-style --data=source-files did not match the expected output!'
fi
2 changes: 1 addition & 1 deletion test/interactive-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if $DUB remove dub --non-interactive; then
echo "Non-interactive remove should fail" 1>&2
exit 1
fi
echo 1 | $DUB remove dub | tr --delete '\n' | grep --ignore-case 'select.*0\.9\.20.*0\.9\.21.*'
echo 1 | $DUB remove dub | tr -d '\n' | grep --ignore-case 'select.*0\.9\.20.*0\.9\.21.*'
if [ -d $HOME/.dub/packages/dub-0.9.20/dub ]; then
echo "Failed to remove dub-0.9.20" 1>&2
exit 1
Expand Down

0 comments on commit 893ee34

Please sign in to comment.