Files
asepharyana 1cdb82a76f Sync config from arch
- hypr/apps.lua
- hypr/autostart.lua
- hypr/envs.lua
- hypr/hyprland.lua
- hypr/hyprsunset.conf
- hypr/input.lua
- hypr/looknfeel.lua
- hypr/omasettings.lua
- hypr/xdph.conf
- omarchy/branding/about.txt
- omarchy/branding/screensaver.txt
- omarchy/extensions/omarchy-menu.jsonc
- omarchy/hooks/battery-low.d/play-warning-sound.sample
- omarchy/hooks/font-set.d/show-font-notification.sample
- omarchy/hooks/post-boot.d/weather.sample
- omarchy/hooks/post-update.d/install-voxtype.hook
- omarchy/hooks/post-update.d/setup-agent.hook
- omarchy/hooks/post-update.d/setup-fingerprint.hook
- omarchy/hooks/post-update.d/show-update-notification.sample
- omarchy/hooks/pre-refresh-pacman.d/add-custom-repo.sample
- omarchy/hooks/theme-set.d/show-theme-notification.sample
- omarchy/shell.json
- omarchy/shell.toml
- omarchy/theme.name
- omarchy/themes/azure-glow/README.md
- omarchy/themes/azure-glow/alacritty.toml
- omarchy/themes/azure-glow/btop.theme
- omarchy/themes/azure-glow/hyprland.conf
- omarchy/themes/azure-glow/hyprlock.conf
- omarchy/themes/azure-glow/icons.theme
- … 269 more
2026-09-23 15:19:12 +07:00

81 lines
1.6 KiB
Bash

#!/bin/bash
if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
echo "source test/shell.d/base-test.sh from a shell test; do not run it directly" >&2
exit 1
fi
ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
SHELL_TEST_DIR="$ROOT/test"
export ROOT
pass() {
printf 'ok - %s\n' "$1"
}
fail() {
local description="$1"
local detail="${2:-}"
[[ -n $detail ]] && printf '%s\n' "$detail" >&2
printf 'not ok - %s\n' "$description" >&2
exit 1
}
require_command() {
local command="$1"
command -v "$command" >/dev/null || fail "required command is available: $command"
}
run_node_test() {
require_command node
{
cat <<'JS_PRELUDE'
const path = require('path')
const root = process.env.ROOT
function fail(description, detail) {
if (detail) console.error(detail)
console.error(`not ok - ${description}`)
process.exit(1)
}
function pass(description) {
console.log(`ok - ${description}`)
}
function assert(condition, description, detail) {
if (!condition) fail(description, detail)
pass(description)
}
function assertEqual(actual, expected, description) {
assert(
actual === expected,
description,
`expected: ${expected}\nactual: ${actual}`
)
}
function assertDeepEqual(actual, expected, description) {
const actualJson = JSON.stringify(actual)
const expectedJson = JSON.stringify(expected)
assert(
actualJson === expectedJson,
description,
`expected: ${expectedJson}\nactual: ${actualJson}`
)
}
function requireFromRoot(relativePath) {
return require(path.join(root, relativePath))
}
JS_PRELUDE
cat
} | node
}