mirror of
https://github.com/dredx/prole.git
synced 2026-09-27 08:04:30 +00:00
- 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>
36 lines
692 B
Bash
36 lines
692 B
Bash
#shellcheck shell=sh
|
|
|
|
# Sometime, functions are defined in a single shell script.
|
|
# You will want to test it. but you do not want to run the script.
|
|
# You want to test only the function, right?
|
|
Describe 'sourced return example'
|
|
Include ./count_lines.sh
|
|
|
|
Example 'test cpunum.sh with stubbed cat /cpu/info'
|
|
Data
|
|
#|1
|
|
#|2
|
|
#|3
|
|
#|4
|
|
#|5
|
|
End
|
|
|
|
When call count_lines
|
|
The stdout should eq 5
|
|
End
|
|
|
|
Example 'test cpunum.sh with stubbed cat /cpu/info'
|
|
Data data
|
|
data() {
|
|
%= "line1"
|
|
%= "line2"
|
|
%= "line3"
|
|
%= "line4"
|
|
%- "line5 (without newline)"
|
|
}
|
|
|
|
When call count_lines
|
|
The stdout should eq 5
|
|
End
|
|
End
|