sal/test_service_manager.rhai
Mahmoud-Emad 131d978450 feat: Add service manager support
- Add a new service manager crate for dynamic service management
- Integrate service manager with Rhai for scripting
- Provide examples for circle worker management and basic usage
- Add comprehensive tests for service lifecycle and error handling
- Implement cross-platform support for macOS and Linux (zinit/systemd)
2025-07-01 18:00:21 +03:00

30 lines
840 B
Plaintext

// Test if service manager functions are available
print("Testing service manager function availability...");
// Try to call a simple function that should be available
try {
let result = exist("/tmp");
print(`exist() function works: ${result}`);
} catch (error) {
print(`exist() function failed: ${error}`);
}
// List some other functions that should be available
print("Testing other SAL functions:");
try {
let files = find_files("/tmp", "*.txt");
print(`find_files() works, found ${files.len()} files`);
} catch (error) {
print(`find_files() failed: ${error}`);
}
// Try to call service manager function
try {
let manager = create_service_manager();
print("✅ create_service_manager() works!");
} catch (error) {
print(`❌ create_service_manager() failed: ${error}`);
}
print("Test complete.");