Skip to content

Commit

Permalink
Fix long form of --output option
Browse files Browse the repository at this point in the history
  • Loading branch information
mavit authored and neverpanic committed May 31, 2018
1 parent 078b723 commit 352849b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google-font-download
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fi
# Parse options
if [ $modern_getopt -eq 1 ]; then
ret=0
temp=$(getopt -o u:f:hl:o: --long url:,format:,help,languages:,output -n "${0:-google-font-download}" -- "$@") || ret=$?
temp=$(getopt -o u:f:hl:o: --long url:,format:,help,languages:,output: -n "${0:-google-font-download}" -- "$@") || ret=$?
if [ $ret -ne 0 ]; then
echo >&2
usage
Expand Down
7 changes: 6 additions & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TESTS=eot svg ttf woff woff2 fonts-with-spaces multiple-fonts format-param output-param font-weight font-style url-arg
TESTS=eot svg ttf woff woff2 fonts-with-spaces multiple-fonts format-param output-param output-long-param font-weight font-style url-arg
TUT=../../google-font-download

# tests use bashisms, avoid failures on systems where dash is used
Expand Down Expand Up @@ -64,6 +64,11 @@ output-param:
$(V)mkdir -p $@ && (cd $@ && $(TUT) -f woff -o "other.css" "Lora" && [ -f "other.css" ] && [ ! -f "font.css" ]); ret=$$?; rm -rf $@ && exit $$ret
$(V)echo " OK"

output-long-param:
$(V)echo "---> Testing that --output works as expected"
$(V)mkdir -p $@ && (cd $@ && $(TUT) -f woff --output="other.css" "Lora" && [ -f "other.css" ] && [ ! -f "font.css" ]); ret=$$?; rm -rf $@ && exit $$ret
$(V)echo " OK"

font-weight:
$(V)echo "---> Testing font weight support"
$(V)mkdir -p $@ && (cd $@ && $(TUT) -f woff "Ubuntu:300" && grep "font-weight: 300;" "font.css" >/dev/null); ret=$$?; rm -rf $@ && exit $$ret
Expand Down

0 comments on commit 352849b

Please sign in to comment.