Files
breeze/tests/storage_paths_behavior.zi
waozi 77dd9a032b Regenerate font subsets for the current locales; port font, locale and storage path tests
The Chinese profile picture string used a character (U+50CF) that no shipped font contained. New glyph coverage and locale key tests replace the old C ones; storage path scenarios run as Ziran processes.
2026-09-28 19:19:47 -03:00

44 lines
1.9 KiB
Ziran

#import "byte_text_linux"
#import, file "storage_test_support.zi";
#import, file "../src/app/text_buffers.zi";
#import, file "../src/storage/data.zi";
#import, file "../src/storage/state.zi";
#import, file "../src/storage/db.zi";
#import, file "../src/storage/storage_core.zi";
#import, file "../src/storage/storage_layout.zi";
#import, file "../src/habits/habit_types.zi";
#import, file "../src/habits/habit_memory.zi";
#import, file "../src/habits/habit_model.zi";
#import, file "../src/storage/storage_sessions.zi";
#import, file "../src/storage/storage_habits.zi";
#import, file "../src/storage/session_mood.zi";
c :: #system_library "c";
write_out :: (descriptor: s32, data: *void, count: usize) -> s64 #foreign c "write";
// The storage vocabulary the whole app relies on.
constants :: () -> s32 {
check_true("export entry", CurrentDatabaseEntry == "inbe-data/inbe.db")
check_true("export metadata entry", ExportMetadataEntry == "inbe-data/metadata.json")
check_true("export metadata format", ExportMetadataFormat == "inbe-data-sqlite")
check_true("database name", CurrentDatabaseName == "inbe.db")
check_true("web home", CurrentWebHome == "/home/inbe")
check_true("posix directory", CurrentDirectoryName == "inbe")
check_true("older database name", PreviousDatabaseName == "breathing.db")
check_true("older database entry", PreviousDatabaseEntry == "breathing-data/breathing.db")
check_true("export filename prefix", ExportFilenamePrefix == "inbe-")
check_true("export filename suffix", ExportFilenameSuffix == ".zip")
return failures
}
// The data root, written to standard output. data_root() caches its answer,
// so the runner starts one process per environment.
#program_export
Check :: () -> s32 {
if constants() != 0 { return 1 }
root := data_root()
text: string = root
unused write_out(1, cast(*void)pointer_of(text), cast(usize)text.count)
return 0
}