cleaned up and maybe finished the guile lab tool
This commit is contained in:
parent
4290973048
commit
74142365eb
24 changed files with 895 additions and 20 deletions
43
packages/lab-tool/testing/test-modular.scm
Executable file
43
packages/lab-tool/testing/test-modular.scm
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env guile
|
||||
!#
|
||||
|
||||
;; Test script for modular refactoring
|
||||
|
||||
(add-to-load-path "lab")
|
||||
|
||||
(use-modules (ice-9 format))
|
||||
|
||||
;; Test logging format module
|
||||
(display "Testing logging format module...\n")
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(use-modules (utils logging format))
|
||||
(display "✅ Logging format module loaded\n")
|
||||
(let ((blue-color (get-color 'blue)))
|
||||
(format #t "Blue color code: ~a\n" blue-color)))
|
||||
(lambda (key . args)
|
||||
(format #t "❌ Failed to load logging format: ~a ~a\n" key args)))
|
||||
|
||||
;; Test config defaults module
|
||||
(display "\nTesting config defaults module...\n")
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(use-modules (utils config defaults))
|
||||
(display "✅ Config defaults module loaded\n")
|
||||
(let ((config default-config))
|
||||
(format #t "Default homelab root: ~a\n" (assoc-ref config 'homelab-root))))
|
||||
(lambda (key . args)
|
||||
(format #t "❌ Failed to load config defaults: ~a ~a\n" key args)))
|
||||
|
||||
;; Test JSON parse module
|
||||
(display "\nTesting JSON parse module...\n")
|
||||
(catch #t
|
||||
(lambda ()
|
||||
(use-modules (utils json parse))
|
||||
(display "✅ JSON parse module loaded\n")
|
||||
(let ((result (parse-json-pure "{\"test\": true}")))
|
||||
(format #t "JSON parse test: ~a\n" result)))
|
||||
(lambda (key . args)
|
||||
(format #t "❌ Failed to load JSON parse: ~a ~a\n" key args)))
|
||||
|
||||
(display "\n🎉 Modular refactoring test complete!\n")
|
Loading…
Add table
Add a link
Reference in a new issue