prole/tests/shellspec/.vendor/shellspec-0.28.1/examples/count_cpus.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

23 lines
756 B
Bash
Executable File

#!/bin/sh
#shellcheck disable=SC2002,SC2126
# Part of 21.intercept_spec.sh
# This is magic. "test" is a `test [expression]` well known as a shell command.
# Normally test without [expression] returns false. It means that __() { :; }
# function is defined if this script runs directly.
#
# shellspec overrides the test command and returns true *once*. It means that
# __() function defined internally by shellspec is called.
#
# In other words. If not in test mode, __ is just a comment. If test mode, __
# is a interception point.
test || __() { :; }
# Interception point. Syntax: `__ [point name] __`
__ begin __
# /proc/cpuinfo depends on the CPU owned by the user.
# It is difficult to test without stubs.
cat /proc/cpuinfo | grep processor | wc -l