John D Pell
683b9f3d99
workaround
2022-03-05 12:04:44 -08:00
John D Pell
5524e82ad5
BATS: unofficial strict mode
2022-03-05 12:04:44 -08:00
John D Pell
d37505b636
test: `shfmt`
...
My apologies to future `git blame` hunters ♥
2022-03-04 14:36:27 -08:00
John D Pell
810c52f91a
test: add new lib files to `setup_libs()`
2022-03-04 14:30:36 -08:00
John D Pell
93a05ccb64
test_helper: make lib loading default
...
Make library loading overridable default for all tests, up through "seach".
2022-03-04 14:20:41 -08:00
John D Pell
c893be3594
tests: add to `clean_files.txt`
2022-03-04 14:20:41 -08:00
John D Pell
6f6a99e3eb
test/install: `shellcheck`
2022-03-04 14:20:41 -08:00
John D Pell
61247a1b76
test/plugin: `shellcheck`
2022-03-04 14:20:40 -08:00
John D Pell
5f11a0d3a2
test/completion: `shellcheck`
2022-03-04 14:17:56 -08:00
John D Pell
99decb8010
test/bash_it: `shellcheck`
2022-03-04 14:17:56 -08:00
John D Pell
45ab5b3d96
test/theme: `shellcheck`
...
test: don't clobber `$PATH`
BATS depends on `$PATH` somehow and if not handled properly, modifying `$PATH` breaks BATS badly. But, it doesn't seem like we have any reason to modify `$PATH` in the first place...so don't.
test/svn: don't clobber `$PATH`
test/ruby: don't clobber `$PATH`
test/search: don't clobber `$PATH`
2022-03-04 14:17:56 -08:00
John D Pell
49b477ef3f
test/lib: `shellcheck`
2022-03-04 14:17:56 -08:00
John D Pell
866e5be86b
lib/command_duration: tests & whitespace
2022-03-04 12:58:07 -08:00
John D Pell
4e0e59230b
lib/command_duration: rename `theme/command_duration.theme`
...
Rename the `theme/command_duration.theme` file as it's not really got anything to do with theming or SCM.
2022-03-04 12:58:07 -08:00
John D Pell
6ca10cf84c
plugin/cmd-returned-notify: Rewrite to match/use `lib/command_duration`
...
Use `$EPOCHREALTIME` (or `$SECONDS`) built-in variable provided by Bash instead of `date +%s`. We're only measuing the difference in seconds, so avoid both the binary invocation as well as the subshell.
Alsö, Reduce environmental pollution by not exporting every variable, and unsetting when done.
Change variable names to match lib/command-duration
Remove `preexec_return_notification()` in favor of `lib/command-duration`'s `_command_duration_pre_exec()`.
This should now use the same preexec hook and variables as the theme library `command_duration`.
tests: handle nanoseconds
2022-03-04 12:58:07 -08:00
John D Pell
6d422f17e4
Revert dc380e9ed6
2022-03-03 23:33:05 -08:00
John D Pell
dc380e9ed6
test/battery: fix tests…
2022-03-03 23:14:33 -08:00
John D Pell
6734baf950
test/base: lose old TravisCS skip
2022-03-03 23:02:29 -08:00
John D Pell
a9dda3d358
test/preexec: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
0d55a2406c
test/base: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
f0dfe1a67f
test/theme: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
b686515877
test/xterm: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
a36a4c4038
test/ruby: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fbf7efa1b8
test/go: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
4a9df8ec88
test/cmd-returned-notify: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
6e2e0af7f9
test/battery: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
beac9c430a
test/aliases: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fd91211704
test/utilities: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
629a1b0c0d
test/search: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
e5cd10112c
test/log: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
1ddec65d56
test/helpers: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
425ef3e10a
test/composure: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
2a95e983d0
test/install: adopt newly revamped `setup()`
...
test/uninstall: adopt newly revamped `setup()`
test/install: `local_setup_file()`
2022-03-03 22:43:17 -08:00
John D Pell
c837232643
test/bash-it: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
de31a308f9
test/bash_it: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
fd1771d45c
test/base: adopt newly revamped `setup()`
2022-03-03 22:43:17 -08:00
John D Pell
cb9b999f06
BATS: de-parallelize
...
Run the test *files* in parallel, but not the tests *within* the files. This can be reverted after configuration (i.e., `$BASH_IT/enabled` et al) lives *outside* the repo.
2022-03-03 22:43:17 -08:00
John D Pell
014c102b71
BATS: revamp test `setup()` and `setup_test_fixture()`
2022-03-03 22:43:17 -08:00
John D Pell
789ede9ef3
plugin/battery: fix tests
2022-02-24 12:52:26 -08:00
Noah Gorny
0619c19f65
Merge pull request #2074 from NariyasuHeseri/master
...
plugin/battery: bug fix
2022-02-14 08:22:33 +02:00
Noah Gorny
561e282585
Merge pull request #2044 from gaelicWizard/completion/alias
...
completion/aliases: eliminate use of `eval`
2022-02-13 23:59:35 +02:00
John D Pell
a9a40a3cad
lib/helpers: add `preview` to `bash-it` spaghetti
2022-02-07 15:27:03 -08:00
John D Pell
302bae9c5f
test/battery: require matching battery identifier
2022-02-03 16:47:17 -08:00
John D Pell
23f7916a4d
test/battery: add multiple-battery edge case
2022-02-03 10:45:27 -08:00
John D Pell
b0862899d7
completion/alias: fix tests
2022-01-30 16:13:54 -08:00
John D Pell
7fcad6ed0d
completion/alias: rename
...
There is no reason for this to be in the `plugins` directory, it just needs to have a load priority sufficiently high that it runs after any aliases are defined.
2022-01-30 16:13:54 -08:00
Noah Gorny
2a9ee7e344
Merge pull request #2019 from gaelicWizard/lib/colors
...
lib/colors: split out metaprogramming
2022-01-30 00:10:14 +02:00
John D Pell
4cf2aae36e
lib/search: code cleanup
...
Improve `_bash-it-erase-term()`, `_bash-it-flash-term()`, `_bash-it-rewind()`, `_bash-it-search-result()`, and `_bash-it-search-component()`. Minor tweaks to `_bash-it-is-partial-match()`, and `_bash-it-search()`.
2022-01-28 13:35:17 -08:00
John D Pell
afeb4d6e11
lib/search: `shellcheck`
...
SC2076
SC2091
SC2004
SC2086
SC2207
2022-01-28 13:35:17 -08:00
John D Pell
16cee1956d
lib/colors: revert #99
...
This reverts bash-it/bash-it#99 , a metaprogramming adventure in terminal color code escape computation. It was functionally reverted in bash-it/bash-it#699 ; I'm just finishing the job.
2022-01-28 13:08:50 -08:00