mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-05-11 05:54:57 +00:00
Lots of test cleanup.
This commit is contained in:
25
Makefile
25
Makefile
@@ -1,5 +1,6 @@
|
||||
SRC_DIR := ./src
|
||||
SCRIPT_DIR := ./script
|
||||
TEST_DIR := ./script
|
||||
VENDOR_DIR := ./vendor
|
||||
|
||||
SRC_FILES := \
|
||||
$(SRC_DIR)/config.zsh \
|
||||
@@ -24,8 +25,15 @@ ALL_TARGETS := \
|
||||
$(PLUGIN_TARGET) \
|
||||
$(OH_MY_ZSH_LINK_TARGET)
|
||||
|
||||
SHUNIT2 := $(VENDOR_DIR)/shunit2/2.1.6
|
||||
STUB_SH := $(VENDOR_DIR)/stub.sh/stub.sh
|
||||
|
||||
TEST_PREREQS := \
|
||||
$(SHUNIT2) \
|
||||
$(STUB_SH)
|
||||
|
||||
TEST_FILES := \
|
||||
$(SCRIPT_DIR)/test*.zsh
|
||||
$(TEST_DIR)/**/*.zsh
|
||||
|
||||
all: $(ALL_TARGETS)
|
||||
|
||||
@@ -36,13 +44,16 @@ $(PLUGIN_TARGET): $(HEADER_FILES) $(SRC_FILES)
|
||||
$(OH_MY_ZSH_LINK_TARGET): $(PLUGIN_TARGET)
|
||||
ln -s $(PLUGIN_TARGET) $@
|
||||
|
||||
$(SHUNIT2):
|
||||
git submodule update --init vendor/shunit2
|
||||
|
||||
$(STUB_SH):
|
||||
git submodule update --init vendor/stub.sh
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm $(ALL_TARGETS)
|
||||
|
||||
.PHONY: test
|
||||
test: all
|
||||
@for test_file in $(TEST_FILES); do \
|
||||
echo "\nRunning $$test_file"; \
|
||||
$$test_file; \
|
||||
done
|
||||
test: all $(TEST_PREREQS)
|
||||
script/test_runner.zsh
|
||||
|
||||
Reference in New Issue
Block a user