From 3cef9d4501f0103da09e79c4f1989688cd7a35d3 Mon Sep 17 00:00:00 2001 From: southerntofu Date: Tue, 22 Sep 2020 15:36:39 +0200 Subject: [PATCH] Test for task ordering --- tests/git.bats | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/git.bats b/tests/git.bats index 658a740..deb71e4 100755 --- a/tests/git.bats +++ b/tests/git.bats @@ -250,6 +250,19 @@ function setup_submodule { [ -f /tmp/forgebuild-time ] } +@test "tasks are run in alphanumeric order" { + # Run in background + $FORGEBUILD -b $FORGEBUILDDIR & + while [ ! -f /tmp/forgebuild-branch ]; do + [ ! -f /tmp/forgebuild-host ] && [ ! -f /tmp/forgebuild-time ] + done + while [ ! -f /tmp/forgebuild-host ]; do + [ ! -f /tmp/forgebuild-time ] + done + sleep 1 + [ -f /tmp/forgebuild-time ] +} + @test "can run with ~/.forgebuild" { if [ -d $HOME/.forgebuild ]; then NEWDIR="$(mktemp -d)"