-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·44 lines (37 loc) · 797 Bytes
/
test.sh
File metadata and controls
executable file
·44 lines (37 loc) · 797 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
# Add the plugin to Neovim's runtimepath so require("toolpath") works
NVIM=(nvim --headless --cmd 'set rtp+=.')
failed=0
echo "=== Syntax check ==="
for f in lua/toolpath/init.lua lua/toolpath/health.lua plugin/toolpath.lua \
test/harness.lua test/test_internals.lua test/test_api.lua; do
if luac -p "$f"; then
echo " OK $f"
else
echo " FAIL $f"
failed=1
fi
done
echo ""
echo "=== test/test_internals.lua ==="
if "${NVIM[@]}" -l test/test_internals.lua; then
:
else
failed=1
fi
echo ""
echo "=== test/test_api.lua ==="
if "${NVIM[@]}" -l test/test_api.lua; then
:
else
failed=1
fi
echo ""
if [ "$failed" -ne 0 ]; then
echo "SOME CHECKS FAILED"
exit 1
else
echo "ALL CHECKS PASSED"
fi