#!/usr/bin/env bash

# This behaves as expected

test_function() {

    echo "This message should be printed"

    # Failure command should stop script
    local variable="$(false)"

    echo "Script should stop and this message should not be printed"

}

# Stop on first failure
set -e

# Run function
test_function
