#!/usr/bin/env bats # Example bats test proving the framework works (C-15 smoke test). # Real script tests live alongside each script under scripts/tests/. load test_helper @test "test_helper assert_status accepts matching status" { assert_status 0 0 assert_status 1 1 } @test "test_helper assert_status rejects mismatch" { run assert_status 0 1 [ "$status" -ne 0 ] } @test "test_helper assert_contains finds substrings" { assert_contains "hello world" "world" } @test "test_helper assert_contains rejects missing substrings" { run assert_contains "hello world" "missing" [ "$status" -ne 0 ] } @test "test_helper assert_not_contains passes when substring absent" { assert_not_contains "hello world" "missing" } @test "test_helper assert_not_contains fails when substring present" { run assert_not_contains "hello world" "world" [ "$status" -ne 0 ] } @test "test_helper assert_json_field detects JSON fields" { assert_json_field '{"ts":"2026-01-01T00:00:00Z","level":"info"}' "ts" assert_json_field '{"ts":"2026-01-01T00:00:00Z","level":"info"}' "level" } @test "test_helper SCRIPTS_DIR resolves to scripts/ directory" { [ -d "$SCRIPTS_DIR" ] [ -f "$SCRIPTS_DIR/install.sh" ] }