-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable macos-13 tests on CI build (#275)
* enable macos-13 tests on CI build * test-sheet: change term from tmux-256color to xterm-256color * test-sheet: more failure logging
- Loading branch information
Showing
2 changed files
with
14 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -587,10 +587,15 @@ test-sheet-cleanup: | |
test-sheet-all: test-sheet-1 test-sheet-2 test-sheet-3 test-sheet-4 test-sheet-5 test-sheet-6 test-sheet-7 test-sheet-8 | ||
@(for SESSION in $^; do ! tmux kill-session -t "$$SESSION" 2>/dev/null; done && ${TEST_PASS} || ${TEST_FAIL}) | ||
|
||
TMUX_TERM=xterm-256color | ||
test-sheet-1: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
# For this first sheet test, separate new-session from the command so that if it fails we get better logging | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@(tmux -v new-session -x 80 -y 5 -d -s $@ "${PREFIX} $< worldcitiespop_mil.csv" && \ | ||
@tmux kill-session 2>/dev/null >/dev/null || printf '' | ||
@echo 'set-option default-terminal "${TMUX_TERM}"' > ~/.tmux.conf | ||
@(tmux -v new-session -x 80 -y 5 -d -s $@ && \ | ||
sleep 0.5 && \ | ||
tmux send-keys -t $@ "${PREFIX} $< worldcitiespop_mil.csv" ENTER && \ | ||
sleep 0.5 && \ | ||
tmux -v capture-pane -t $@ -p ${REDIRECT1} ${TMP_DIR}/[email protected] && \ | ||
tmux -v send-keys -t $@ "q" && \ | ||
|
@@ -626,7 +631,7 @@ test-sheet-4: ${BUILD_DIR}/bin/zsv_sheet${EXE} | |
|
||
test-sheet-5: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@echo 'set-option default-terminal "${TMUX_TERM}"' > ~/.tmux.conf | ||
@(tmux new-session -x 160 -y 5 -d -s $@ "${PREFIX} $< worldcitiespop_mil.csv" && \ | ||
sleep 0.5 && \ | ||
tmux capture-pane -t $@ -p ${REDIRECT1} ${TMP_DIR}/$@.out && \ | ||
|
@@ -635,7 +640,7 @@ test-sheet-5: ${BUILD_DIR}/bin/zsv_sheet${EXE} | |
|
||
test-sheet-6: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@echo 'set-option default-terminal "${TMUX_TERM}"' > ~/.tmux.conf | ||
@(tmux new-session -x 80 -y 50 -d -s $@ "${PREFIX} $< -d 3 ${TEST_DATA_DIR}/test/mixed-line-endings.csv" && \ | ||
sleep 0.5 && \ | ||
tmux send-keys -t $@ "G" "C-u" "C-u" "C-u" && \ | ||
|
@@ -646,29 +651,18 @@ test-sheet-6: ${BUILD_DIR}/bin/zsv_sheet${EXE} | |
|
||
test-sheet-7: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@(tmux new-session -x 80 -y 5 -d -s $@ "${PREFIX} $< -d 3 ${TEST_DATA_DIR}/test/mixed-line-endings.csv" && \ | ||
sleep 0.5 && \ | ||
tmux send-keys -t $@ "G" "g" "g" "C-u" "/" "1234" "Enter" && \ | ||
sleep 0.5 && \ | ||
tmux capture-pane -t $@ -p ${REDIRECT1} ${TMP_DIR}/$@.out && \ | ||
tmux send-keys -t $@ "q" && \ | ||
${CMP} ${TMP_DIR}/$@.out expected/$@.out && ${TEST_PASS} || ${TEST_FAIL}) | ||
|
||
test-sheet-7: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@echo 'set-option default-terminal "${TMUX_TERM}"' > ~/.tmux.conf | ||
@(tmux new-session -x 80 -y 5 -d -s $@ "${PREFIX} $< -d 3 ${TEST_DATA_DIR}/test/mixed-line-endings.csv" && \ | ||
sleep 0.5 && \ | ||
tmux send-keys -t $@ "G" "g" "g" "C-u" "/" "1234" "Enter" && \ | ||
sleep 0.5 && \ | ||
tmux capture-pane -t $@ -p ${REDIRECT1} ${TMP_DIR}/$@.out && \ | ||
tmux send-keys -t $@ "q" && \ | ||
${CMP} ${TMP_DIR}/$@.out expected/$@.out && ${TEST_PASS} || ${TEST_FAIL}) | ||
${CMP} ${TMP_DIR}/$@.out expected/$@.out && ${TEST_PASS} || (echo 'Incorrect output:' && cat ${TMP_DIR}/$@.out && ${TEST_FAIL})) | ||
|
||
test-sheet-8: ${BUILD_DIR}/bin/zsv_sheet${EXE} | ||
@${TEST_INIT} | ||
@echo 'set-option default-terminal "tmux-256color"' > ~/.tmux.conf | ||
@echo 'set-option default-terminal "${TMUX_TERM}"' > ~/.tmux.conf | ||
@(tmux new-session -x 160 -y 5 -d -s $@ "${PREFIX} $< worldcitiespop_mil.csv" && \ | ||
sleep 0.5 && \ | ||
tmux send-keys -t $@ "f" "e" "Enter" && \ | ||
|
@@ -677,5 +671,4 @@ test-sheet-8: ${BUILD_DIR}/bin/zsv_sheet${EXE} | |
sleep 0.5 && \ | ||
tmux capture-pane -t $@ -p ${REDIRECT1} ${TMP_DIR}/$@.out && \ | ||
tmux send-keys -t $@ "q" && \ | ||
${CMP} ${TMP_DIR}/$@.out expected/$@.out && ${TEST_PASS} || ${TEST_FAIL}) | ||
|
||
${CMP} ${TMP_DIR}/$@.out expected/$@.out && ${TEST_PASS} || (echo 'Incorrect output:' && cat ${TMP_DIR}/$@.out && ${TEST_FAIL})) |