gas-stack/ops/gas_init_test.sh
wispem-wantex 2146e1de77
All checks were successful
CI / build-docker (push) Successful in 7s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Successful in 20s
test: add integration test for 'gas init'
2025-11-09 00:03:30 -08:00

32 lines
510 B
Bash
Executable File

#!/bin/bash
# ------------------
# This is a test script that initializes a new project.
# ------------------
set -e
set -x
PS4='+(${BASH_SOURCE}:${LINENO}): '
cd "$(dirname "${BASH_SOURCE[0]}")/.."
# Compile `gas`
gas="/tmp/gas"
go build -o $gas ./cmd
test_project="/memory/test_gasproj"
if [[ -e $test_project ]]; then
rm -r "$test_project"
fi
$gas init "$test_project" <<EOF
mymodule
mydb.db
prog
EOF
# Notify success in green
echo -e "\033[32mAll tests passed. Finished successfully.\033[0m"