Lines Matching refs:err_exit
20 function err_exit
26 alias err_exit='err_exit $LINENO'
31 tmp=$(mktemp -dt) || { err_exit mktemp -dt failed; exit 1; }
36 then err_exit 'foo, where foo is alias for "print hello" failed'
39 then err_exit 'foo world, where foo is alias for "print hello" failed'
44 then err_exit 'foo bar, where foo is alias for "print hello " failed'
47 then err_exit 'foo \bar, where foo is alias for "print hello " failed'
51 then err_exit 'bar, where bar is alias for "foo world" failed'
54 then err_exit 'alias bar, where bar is alias for "foo world" failed'
56 unalias foo || err_exit "unalias foo failed"
57 alias foo 2> /dev/null && err_exit "alias for non-existent alias foo returns true"
62 then err_exit 'alias bar, where bar is alias for "print foo$bar" failed'
67 then err_exit 'alias bar cause variable bar to be set'
71 then err_exit 'alias for !!=print not working'
75 then err_exit 'alias in command substitution not working'
79 then err_exit 'alias not working after unalias in subshell'
83 then [[ ! $(alias -t | grep rm= ) ]] && err_exit 'tracked alias not set'
85 [[ $(alias -t | grep rm= ) ]] && err_exit 'tracked alias not cleared'
92 hash -r -- $i 2>/dev/null || err_exit "hash -r -- $i failed"
93 [[ $(hash) == $i=$tmp/$i ]] || err_exit "hash -r -- $i failed, expected $i=$tmp/$i, got $(hash)"
95 else err_exit 'hash -r failed'
97 ( alias :pr=print) 2> /dev/null || err_exit 'alias beginning with : fails'
98 ( alias p:r=print) 2> /dev/null || err_exit 'alias with : in name fails'
100 unalias no_such_alias && err_exit 'unalias should return non-zero for unknown alias'