aboutsummaryrefslogtreecommitdiffstats
path: root/test/fixtures/proc_meminfo
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-16 19:23:35 +0200
committerDanilo M. <danix@danix.xyz>2026-09-16 19:23:35 +0200
commitf822a250f9b2759207d64cc53b3d80c0c08d2082 (patch)
treeb3ea539a252b7d7c34b08410b371cd58f583ca05 /test/fixtures/proc_meminfo
parent4538896ce65156883dc44cc3355435d40d7e682b (diff)
downloadconky-theme-udt-f822a250f9b2759207d64cc53b3d80c0c08d2082.tar.gz
conky-theme-udt-f822a250f9b2759207d64cc53b3d80c0c08d2082.zip
feat: add /proc and /sys parsers with fixture tests
Parsers take file contents as a string, not a path, so they test against committed fixtures with no filesystem mocking. hwmon is globbed by its name file rather than a fixed index, carried over from the old config: indices drift across kernel reorders and a stale one silently reads a different chip. Failure returns nil, never 0. A sensor reading 0 C is legitimate, so 0 cannot double as an error value. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'test/fixtures/proc_meminfo')
-rw-r--r--test/fixtures/proc_meminfo7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/fixtures/proc_meminfo b/test/fixtures/proc_meminfo
new file mode 100644
index 0000000..9c279aa
--- /dev/null
+++ b/test/fixtures/proc_meminfo
@@ -0,0 +1,7 @@
+MemTotal: 31943076 kB
+MemFree: 4291244 kB
+MemAvailable: 25627088 kB
+Buffers: 123456 kB
+Cached: 6789012 kB
+SwapTotal: 8388604 kB
+SwapFree: 8388604 kB