summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-05-26 01:02:57 -0400
committerDan Davison <dandavison7@gmail.com>2020-05-26 10:46:09 -0400
commitd0db4232109217262a524497aeeb2b8b1fd695d8 (patch)
tree66ff81e0d43a7e7108f47eba5c408e95d95553dd
parente6850387b3c84b2f2c24f8e885b627992edd370d (diff)
Add test of deprecated options
-rw-r--r--Makefile1
-rwxr-xr-xci/script.sh1
-rwxr-xr-xtests/test_deprecated_options21
3 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index e8553971..0c1fd3a8 100644
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ unit-test:
end-to-end-test: build
./tests/test_color_only_output_matches_git_on_full_repo_history
+ ./tests/test_deprecated_options > /dev/null
release:
@make -f release.Makefile release
diff --git a/ci/script.sh b/ci/script.sh
index 51e638d6..0237e644 100755
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -10,6 +10,7 @@ if [[ $TARGET != arm-unknown-linux-gnueabihf ]] && [[ $TARGET != aarch64-unknown
cargo test --target "$TARGET" --verbose
cargo build --release
./tests/test_color_only_output_matches_git_on_full_repo_history
+ ./tests/test_deprecated_options > /dev/null
cargo run --target "$TARGET" -- < /dev/null
fi
diff --git a/tests/test_deprecated_options b/tests/test_deprecated_options
new file mode 100755
index 00000000..2bd8741b
--- /dev/null
+++ b/tests/test_deprecated_options
@@ -0,0 +1,21 @@
+foreground_color=red
+for decoration_attr in box underline plain; do
+
+ git show | ./target/release/delta --commit-style $decoration_attr
+ git show | ./target/release/delta --file-style $decoration_attr
+ git show | ./target/release/delta --hunk-style $decoration_attr
+
+ git show | ./target/release/delta --commit-color $foreground_color
+ git show | ./target/release/delta --file-color $foreground_color
+ git show | ./target/release/delta --hunk-color $foreground_color
+
+ git show | ./target/release/delta --commit-color $foreground_color --commit-style $decoration_attr
+ git show | ./target/release/delta --file-color $foreground_color --file-style $decoration_attr
+ git show | ./target/release/delta --hunk-color $foreground_color --hunk-style $decoration_attr
+
+done
+
+background_color=blue
+for option in --minus-color --plus-color --minus-emph-color --plus-emph-color; do
+ git show | ./target/release/delta $option $background_color
+done