Commit Graph

15 Commits (e2be8bc2bc9dccf2f2023c7d262b6e68ea02132a)

Author SHA1 Message Date
Alex Thiessen 9f3889c284
test: Make `rsync` optional
For bulk copying, `rsync` is used in test code, which is rather fast and
capable of saving needless write operations. The downside is that tests
fail when the tool is missing, which is the case with most minimal Linux
setups (e.g. containers or even Gnome installations of Debian).

Provide an alternative way for sufficiently fast copying by means of
`find -exec cp`. Measured total test time penalty is less than 0.5%.
Downside of needless write operations remains in case of fallback.
2020-05-11 02:30:10 +02:00
Nils Winkler e9467825ec
Removed assert_link_exist function
This is now provided by the used version of bats-file.
2020-04-22 11:16:10 +02:00
Nils Winkler 9269c4445d
Went back to the bats-file temp_make function
Switching to tralston/bats-file allowed to use temp_make on macOS.
2020-04-21 08:25:40 +02:00
Nils Winkler bc433cd999
Fixing the mktemp function on Linux 2020-04-21 08:25:40 +02:00
Nils Winkler 818a95d79c
Refactored test setup code
Removed the copy/paste code, moved it into a reusable function that can
be called from the `local_setup` function as needed. Also simplified the
handling of the $HOME variable since @rico-chet provided a better way of
doing this.
2020-04-21 08:25:40 +02:00
Alex Thiessen 3d45f01728
test/test_helper: Don't use system/user `git` config
Git uses system-wide and user-wide configurations per default and these
can interfere with our tests. Keep `git` from using them by setting the
according environment variables.

This might also help with other tools which access user's home
directory.
2020-04-08 14:31:33 +02:00
Piotr Rogoża 89d1661d23 Replaced reload section with proper function.
Added completion for reload.
Fixed order in completion
Added unit tests for completion
The variable BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE has to be unset.
2018-04-18 21:51:20 +02:00
Nils Winkler 80e510d65b Added assert_link_exist function and use that 2017-10-14 18:02:04 +02:00
Nils Winkler e574de8f47 Moved testing for files to bats-file library functions 2017-10-14 18:02:04 +02:00
Nils Winkler 2691a5b138 Moved to bats-assert for assert functions 2017-10-14 18:00:43 +02:00
Nils Winkler 9eb10c266b Added support for local setup/teardown functions 2017-06-24 17:31:30 +02:00
Ivan Povalyukhin 34670ea021 [tests] make setup function to create test dir per test 2015-05-03 18:11:27 -07:00
Ivan Povalyukhin b3334bc9e5 adjust env vars in test_helper to make CI pass 2015-03-29 18:23:24 -07:00
Ivan Povalyukhin cbcdd66863 test base.plugin#pickfrom 2015-03-29 17:27:48 -07:00
Ivan Povalyukhin a13719f28f test lib#composure_keywords 2015-03-28 18:54:37 -07:00