prole/tests/shellspec/.vendor/shellspec-0.28.1/spec/libexec/grammar_spec.sh
chrisfu 909e92109e Refactor shell layout; add shellspec + authority
- Introduce lib/shell helpers and keep etc/* scripts thin via compatibility shims

- Move Kerberos validation to scripts/validation/check_kerberos.sh and update callers

- Add deterministic shellspec unit tests under tests/shellspec/ and wire Maven to run them

- Add minimal Spring Boot authority module with startup + /health endpoint and Maven wiring

- Document the new layout in docs/layout.md

Co-authored-by: Junie <junie@jetbrains.com>
2026-03-13 09:19:56 -07:00

32 lines
819 B
Bash

#shellcheck shell=sh
Describe "libexec/grammar.sh"
# shellcheck disable=SC2034
SHELLSPEC_SOURCE="$SHELLSPEC_LIB/libexec/grammar.sh"
Include "$SHELLSPEC_LIB/libexec/grammar.sh"
Describe 'mapping()'
dsl() { false; }
directive() { false; }
is_function_name() { false; }
It 'does not translate when it unknown line'
When call mapping func args
The status should be failure
End
It 'translate to DSL when it matches DSL'
dsl() { echo DSL; return 0; }
When call mapping func args
The stdout should eq DSL
End
It 'translate to directive when it matches directive'
is_function_name() { true; }
directive() { echo directive; return 0; }
When call mapping "foo()" "{ %directive; }"
The stdout should eq directive
End
End
End