Skip to content

Test failures (especially with bash) #29

Description

@blueyed

I am seeing a few test failures with make test_bash.

The first one ("35 - autoedit seems to work") also happens with zsh.

t/harness.sh /bin/bash
Testing with SHELL=/bin/bash
1..19
ok 1 - created 3 element array
ok 2 - extended array by one quoted element
ok 3 - quoted element is in-tact
ok 4 - unshift extended array
ok 5 - unshift put element at beginning of array
ok 6 - quoted element is still last and still in-tact
ok 7 - array shrunk by one element from pop
ok 8 - got correct element from pop
ok 9 - array shrunk by one element from shift
ok 10 - got correct element from shift
ok 11 - array reversed, last is now first
ok 12 - array reversed, first is now last
ok 13 - copied array
ok 14 - array detected
ok 15 - non-array detected
ok 16 - afirst works with element with double-space
ok 17 - alast works with element with double-space
ok 18 - apop works with element with double-space
ok 19 - ashift works with element with double-space
1..36
ok 1 - manual stash warned
ok 2 - stashed variable
ok 3 - manual unstash warned
ok 4 - unstashed variable successfully
ok 5 - stash variable unset
ok 6 - unexported on unstash
ok 7 - double unstash did not delete value
ok 8 - manual autostash warned
ok 9 - autounstashed variable successfully
ok 10 - stash variable unset
ok 11 - autostash variable unset
ok 12 - quieted warning
ok 13 - double stash warns
ok 14 - did not double stash without force
ok 15 - force double stash does not warn
ok 16 - double stashed with force
ok 17 - double stash assign without force worked
ok 18 - stashed unset variable
ok 19 - stash-assigned value
ok 20 - could unstash from stash-assignment
ok 21 - autostash-assigned value
ok 22 - could unstash from autostash-assignment
ok 23 - stash-assigned previously unset variable
ok 24 - unset previously unset variable on unstash
ok 25 - autostash-assigned previously unset variable
ok 26 - unset previously unset variable on autounstash
ok 27 - could stash-assign complex quoted expression
ok 28 - variable exported on unstash
ok 29 - unstashed alias
ok 30 - unstashed function at the same time as alias
ok 31 - unstashed array
ok 32 - created smartcd file
ok 33 - correctly configured autostash
ok 34 - restored variable
not ok 35 - autoedit seems to work
#   Failed test 'autoedit seems to work'
#   in t/tap-functions:is() at line 290.
#          got: '########################################################################
# smartcd bash_enter - /home/user/.dotfiles/smartcd
#
# This is a smartcd script.  Commands you type will be run when you
# bash_enter this directory.  The string __PATH__ will be replaced with
# the current path.
#
# See http://smartcd.org for more ideas about what can be put here
########################################################################'
#     expected: 'autostash RANDOM_VARIABLE'
ok 36 - restored $HOME
# Looks like you failed 1 test of 36.
1..13
ok 1 - smartcd informed user of script execution
ok 2 - quieted output
ok 3 - bash_enter executed successfully using smartcd
ok 4 - bash_enter executed successfully using smartcd pushd
ok 5 - bash_leave executed successfully using smartcd
ok 6 - bash_leave executed successfully using smartcd popd
ok 7 - cd -P still works
lib/core/smartcd: line 317: $file: ambiguous redirect
lib/core/smartcd: line 339: $base/inodes$dir.inode: ambiguous redirect
not ok 8 - could enter and leave a directory with a space
#   Failed test 'could enter and leave a directory with a space'
#   in t/tap-functions:is() at line 290.
#          got: 'WARNING!  Possibly outdated scripts detected, not running them.  These
scripts were created for a directory which has been deleted or replaced,
but the scripts for them remained.  Please check the following files
for correctness:

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_enter
    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_leave

Once you have verified or corrected the situation, remove the following
file to make this warning go away

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode

If you don't wish to keep this safety check in place, set SMARTCD_NO_INODE=1
or re-run `smartcd config`

To permanently ignore this check only for /home/user/.dotfiles/smartcd/dir with a space, run the following command

    echo '*' > "/home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode"'
#     expected: '1 2'
lib/core/smartcd: line 339: $base/inodes$dir.inode: ambiguous redirect
lib/core/smartcd: line 317: $file: ambiguous redirect
lib/core/smartcd: line 339: $base/inodes$dir.inode: ambiguous redirect
lib/core/smartcd: line 339: $base/inodes$dir.inode: ambiguous redirect
not ok 9 - could enter and leave a subdirectory of a directory with a space
#   Failed test 'could enter and leave a subdirectory of a directory with a space'
#   in t/tap-functions:is() at line 290.
#          got: 'WARNING!  Possibly outdated scripts detected, not running them.  These
scripts were created for a directory which has been deleted or replaced,
but the scripts for them remained.  Please check the following files
for correctness:

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_enter
    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_leave

Once you have verified or corrected the situation, remove the following
file to make this warning go away

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode

If you don't wish to keep this safety check in place, set SMARTCD_NO_INODE=1
or re-run `smartcd config`

To permanently ignore this check only for /home/user/.dotfiles/smartcd/dir with a space, run the following command

    echo '*' > "/home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode"
WARNING!  Possibly outdated scripts detected, not running them.  These
scripts were created for a directory which has been deleted or replaced,
but the scripts for them remained.  Please check the following files
for correctness:

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/subdir/bash_enter
    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/subdir/bash_leave

Once you have verified or corrected the situation, remove the following
file to make this warning go away

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space/subdir.inode

If you don't wish to keep this safety check in place, set SMARTCD_NO_INODE=1
or re-run `smartcd config`

To permanently ignore this check only for /home/user/.dotfiles/smartcd/dir with a space/subdir, run the following command

    echo '*' > "/home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space/subdir.inode"
WARNING!  Possibly outdated scripts detected, not running them.  These
scripts were created for a directory which has been deleted or replaced,
but the scripts for them remained.  Please check the following files
for correctness:

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_enter
    /home/user/.dotfiles/smartcd/tmphome/.smartcd/scripts/home/user/.dotfiles/smartcd/dir with a space/bash_leave

Once you have verified or corrected the situation, remove the following
file to make this warning go away

    /home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode

If you don't wish to keep this safety check in place, set SMARTCD_NO_INODE=1
or re-run `smartcd config`

To permanently ignore this check only for /home/user/.dotfiles/smartcd/dir with a space, run the following command

    echo '*' > "/home/user/.dotfiles/smartcd/tmphome/.smartcd/inodes/home/user/.dotfiles/smartcd/dir with a space.inode"'
#     expected: '1 2 3 4'
ok 10 - ran two bash_enter scripts in correct order
ok 11 - ran two bash_leave scripts in correct order
ok 12 - smartcd doesn't try to re-enter a deleted directory
ok 13 - not running zsh, no chpwd-hook
# Looks like you failed 2 tests of 13.
make: *** [test_bash] Error 2

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions