diff options
author | Tom Willemse | 2020-10-15 10:30:02 -0700 |
---|---|---|
committer | Tom Willemse | 2020-10-15 14:25:18 -0700 |
commit | a49fda9c7930df7ecaa813cc5c6bdfac9308332d (patch) | |
tree | 42ffd9067b42ebc176d23d463550e6a7736a3e0f /test/integration/oni-core.bats | |
parent | b0419479023e9850e3c1f90a122b2e13b98aace8 (diff) | |
download | emacs-config-a49fda9c7930df7ecaa813cc5c6bdfac9308332d.tar.gz emacs-config-a49fda9c7930df7ecaa813cc5c6bdfac9308332d.zip |
Use ws-butler
At work I have to work with a lot of files that other people work on as well.
Other people don’t usually have their editor set up to remove all trailing
whitespace, and we’re not allowed to make a change that includes a lot of extra
whitespace changes[1]. So I end up having to revert a lot of whitespace changes
just before submitting. And if I then have to make more changes, for example
because something was pointed out in a code review, I have to do it again.
‘ws-butler’ promises that it will still prevent me from submitting extraneous
whitespace, but will not touch lines that I haven’t changed, so that would
prevent me from having to revert them all the time.
[1]: This is good, having a lot of whitespace changes can distract from or even
completely hide the actual change you’re trying to make.
Diffstat (limited to 'test/integration/oni-core.bats')
-rwxr-xr-x | test/integration/oni-core.bats | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/oni-core.bats b/test/integration/oni-core.bats index adf6a4f..373d3ea 100755 --- a/test/integration/oni-core.bats +++ b/test/integration/oni-core.bats @@ -35,3 +35,21 @@ [[ "$output" == *"t" ]] } + +@test "Starting Emacs diminishes ws-butler-global-mode" { + run emacs -batch -l package -f package-initialize -l subr-x \ + -eval "(prin1 (string-empty-p (car (alist-get 'ws-butler-mode minor-mode-alist))))" + + echo "$output" + + [[ "$output" == *"t" ]] +} + +@test "Starting Emacs turns on ws-butler-mode" { + run emacs -batch -l package -f package-initialize \ + -eval "(prin1 (bound-and-true-p ws-butler-mode))" + + echo "$output" + + [[ "$output" == *"t" ]] +} |