-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (50 loc) · 1.75 KB
/
Makefile
File metadata and controls
58 lines (50 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.PHONY: test test-basic test-commands test-integration test-verbose help install-bats install-helpers
help:
@echo "Try Script Test Suite"
@echo ""
@echo "Available targets:"
@echo " make test - Run all tests"
@echo " make test-basic - Run basic function tests"
@echo " make test-commands - Run command tests"
@echo " make test-integration - Run integration tests"
@echo " make test-verbose - Run all tests with verbose output"
@echo " make install-bats - Install bats-core (macOS)"
@echo " make install-helpers - Install bats helper libraries"
@echo ""
test:
@echo "Running all tests..."
@bats tests/
test-basic:
@echo "Running basic function tests..."
@bats tests/basic_functions.bats
test-commands:
@echo "Running command tests..."
@bats tests/commands.bats
test-integration:
@echo "Running integration tests..."
@bats tests/integration.bats
test-verbose:
@echo "Running all tests (verbose)..."
@bats -p tests/
install-bats:
@echo "Installing bats-core via Homebrew..."
@if command -v brew >/dev/null 2>&1; then \
brew install bats-core; \
else \
echo "Homebrew not found. Please install manually:"; \
echo "https://github.com/bats-core/bats-core#installation"; \
fi
install-helpers:
@echo "Installing bats helper libraries..."
@mkdir -p tests/test_helper
@if [ ! -d "tests/test_helper/bats-support" ]; then \
git clone https://github.com/bats-core/bats-support.git tests/test_helper/bats-support; \
else \
echo "bats-support already installed"; \
fi
@if [ ! -d "tests/test_helper/bats-assert" ]; then \
git clone https://github.com/bats-core/bats-assert.git tests/test_helper/bats-assert; \
else \
echo "bats-assert already installed"; \
fi
@echo "Helper libraries installed successfully"