Fix regression on ~/.jq being a directory

This commit is contained in:
Muh Muhten authored and Nico Williams committed 2019-02-26 21:57:08 -06:00
1 parent 30afc86af1
commit 141bb78e96
5 files changed
+29 -24

No files matched your search

File renamed without changes.
+1
View File
@@ -0,0 +1 @@
def g: 1;
+7 -2
View File
@@ -218,16 +218,21 @@ clean=true
# Check handling of ~/.jq; these can't move into jq_test.c yet because
# they depend on $HOME
if [ "$(HOME="$mods" $VALGRIND $Q $JQ -nr fg)" != foobar ]; then
if [ "$(HOME="$mods/home1" $VALGRIND $Q $JQ -nr fg)" != foobar ]; then
echo "Bug #479 appears to be back" 1>&2
exit 1
fi
if [ $(HOME="$mods" $VALGRIND $Q $JQ --debug-dump-disasm -n fg | grep '^[a-z]' | wc -l) -gt 3 ]; then
if [ $(HOME="$mods/home1" $VALGRIND $Q $JQ --debug-dump-disasm -n fg | grep '^[a-z]' | wc -l) -ne 3 ]; then
echo "Binding too many defs into program" 1>&2
exit 1
fi
if ! HOME="$mods/home2" $VALGRIND $Q $JQ -n 'include "g"; empty'; then
echo "Mishanding directory ~/.jq" 1>&2
exit 1
fi
cd "$JQBASEDIR" # so that relative library paths are guaranteed correct
if ! $VALGRIND $Q $JQ -L ./tests/modules -ne 'import "test_bind_order" as check; check::check==true'; then
echo "Issue #817 regression?" 1>&2