Commit Graph

23 Commits

Author SHA1 Message Date
Tom "Ravi" Hale
e46a7c3309 ls_with_file_shortcuts: fail rather than create incorrect variables
Removes the danger from issue #274.

The proper fix will need to address issue #260.
2018-09-14 19:58:09 +07:00
Tom "Ravi" Hale
f55ce1e6a3 test_ls_with_file_shortcuts: clean up temp files 2018-09-02 11:34:32 +07:00
Tom "Ravi" Hale
b193438ca1 shell_shortcuts_test: Unset $QUOTING_STYLE for predictable ls output 2018-09-02 11:28:47 +07:00
Tom "Ravi" Hale
5f286eaaaa Quote arrays to avoid splitting by $IFS 2018-09-01 20:14:36 +07:00
Wilhelmina Drengwitz
77916f056a Add bash & zsh compatible way to resolve abs exe paths 2018-08-31 09:09:46 -04:00
Willa Drengwitz
a3ff809cbe Fix ordering to match declare order 2018-08-31 07:56:58 -04:00
Willa Drengwitz
e6363ac955 Merge remote-tracking branch 'mroth/osx-testing' into osx-testing 2018-08-31 07:48:09 -04:00
Martino Visintin
39f6596861 fix bin path testing 2017-02-12 20:43:00 +00:00
Wilhelmina Drengwitz
6f4babeced Extend tests to use conditional exe paths 2017-01-31 15:50:14 -05:00
Martino Visintin
455239f594 make tests independent of bin locations
On my system (Arch Linux), the commands {mv,rm,sed} live under
`/usr/bin`, not under `/bin`. So the tests were failing.

This commit hard-codes the initial paths to make the tests independent
on their real paths.
2017-01-27 21:41:53 +00:00
Jean Blanchard
349896b0cf Make ls aliases optional 2015-03-06 09:41:31 +00:00
Matthew Rothenberg
ae4b93f52f declare original location of cmds
The previous tests assumed default locations for all commands, however
they do not exist in the same place on all *nixes.  I encountered this
when the test was failing on MacOSX where it was expected hardcoded
`/bin/sed` when in fact the code was identifying the correct local
expansion of `/usr/bin/sed`.

To make this test more robust, it now checks for the original location
of all cmds and uses that in its expansion tests for
`test_shell_command_wrapping()`.
2014-10-16 17:05:43 -04:00
Matthew Rothenberg
1cd162434f Make sure we have physical path back from mktemp
Darwin actually symlinks /var inside /private, but mktemp reports back
the logical pathat time of file creation.  So make sure we always get
the full physical path to be absolutely certain when doing comparisons
later, because thats how the Ruby status_shortcuts.rb script is going to
obtain them.
2014-10-16 17:05:43 -04:00
Matthew Rothenberg
b395596496 dont use grep -P for cross-platform compatibility
`grep -P` gives access to the PCRE matching engine, which is nice,
however, the version of grep shipped on many BSD systems (including
Darwin) does not have this flag.

Currently, `grep -P` was being used in the `_includes()` test helper.

For cross platform compatibility in tests, do not rely upon this option.
Luckily, all existing tests seem to work fine without it already!
2014-10-16 15:26:34 -04:00
Nathan Broadbent
dd10be79e2 Re-wrap functions as functions. Fixes issue with RVM reload (cd wrapper will be overwritten without error) 2013-01-30 22:29:05 +13:00
Nathan Broadbent
3692db6a3a Ensure tests run if RVM isn't loaded but $HOME/.rvm is present 2013-01-30 12:09:44 +13:00
Nathan Broadbent
bc969b3e6f Fixed tests 2012-11-17 11:49:46 +13:00
Nathan Broadbent
436b0da138 Further ll fixes for escaped spaces and quotes! 2012-10-23 23:34:17 +13:00
Nathan Broadbent
4d62b25ed6 Made tests a bit neater with indentation 2012-10-23 12:39:30 +13:00
Nathan Broadbent
06c2e26804 Added test for ls with subdirectory 2012-10-23 12:30:25 +13:00
Nathan Broadbent
5836617dbf Fully fixed up ll escaping, added lots of tests 2012-10-23 12:25:28 +13:00
Nathan Broadbent
32a184d8c0 '.' => 'source' (some people alias '.' as something different) 2012-09-19 21:40:29 +12:00
Nathan Broadbent
fee234b124 Added tests for shell command wrapping 2012-08-23 11:10:40 +12:00