Initial commit

This commit is contained in:
Warezpeddler
2026-04-25 23:09:31 +01:00
commit 3325436017
92 changed files with 18397 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
from applepy.checks.core import _parse_alf_globalstate
def test_parse_alf_globalstate_digit() -> None:
state, note = _parse_alf_globalstate("0\n", 0)
assert state == 0
assert note == "ok"
def test_parse_alf_globalstate_multiline() -> None:
state, note = _parse_alf_globalstate("foo\n2\n", 0)
assert state == 2
assert note == "ok"
def test_parse_alf_globalstate_missing() -> None:
state, note = _parse_alf_globalstate(
"2025-01-01 12:00:00.000 defaults[123:456] Could not find domain com.apple.alf\n",
1,
)
assert state is None
assert note == "preference_missing_or_unreadable"