From b215e6a6448d3dbcf6f409dc40c664ac37bf9825 Mon Sep 17 00:00:00 2001 From: Trustable User Date: Sat, 11 Jul 2026 11:42:24 +0200 Subject: [PATCH] Use dynamic release expectations --- tests/help.bats | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/help.bats b/tests/help.bats index 4f7ea1c..8fc320e 100644 --- a/tests/help.bats +++ b/tests/help.bats @@ -19,6 +19,8 @@ setup() { load 'test_helper/bats-support/load' load 'test_helper/bats-assert/load' export NO_COLOR=1 + EXPECTED_VERSION="$(tr -d '\r\n' < ../version.txt)" + EXPECTED_BRANCH="$(tr -d '\r\n' < ../branch.txt)" ops -reset force cd .. } @@ -36,10 +38,10 @@ setup() { run ops -help assert_line "Tools (use - -h for help):" - run ops -v - assert_line --partial "0.1.0" - run ops -version - assert_line --partial "0.1.0" + run ops -v + assert_line "$EXPECTED_VERSION" + run ops -version + assert_line "$EXPECTED_VERSION" run ops action --help assert_line --partial "ops action [command]" @@ -69,10 +71,10 @@ setup() { run ops -i assert_success - assert_line --partial OPS_VERSION: 0.1.0 - assert_line "OPS_BRANCH: 0.1.0" + assert_line "OPS_VERSION: $EXPECTED_VERSION" + assert_line "OPS_BRANCH: $EXPECTED_BRANCH" run ops -info - assert_line --partial OPS_VERSION: 0.1.0 + assert_line "OPS_VERSION: $EXPECTED_VERSION" run ops -u assert_success @@ -96,4 +98,3 @@ setup() { assert_line "ops -config [options] [KEY | KEY=VALUE [KEY=VALUE ...]]" } -