first commit
This commit is contained in:
34
scripts/test_event.rhai
Normal file
34
scripts/test_event.rhai
Normal file
@@ -0,0 +1,34 @@
|
||||
// Test OSIRIS Event Creation
|
||||
// Run with: cargo run --bin runner --features rhai-support -- test1 --script-file scripts/test_event.rhai
|
||||
|
||||
print("=== OSIRIS Event Test ===\n");
|
||||
|
||||
// Create an event
|
||||
print("Creating event...");
|
||||
let event = event("test_calendar", "OSIRIS Runner Test Meeting")
|
||||
.description("Testing the OSIRIS standalone runner")
|
||||
.location("Virtual")
|
||||
.category("testing")
|
||||
.all_day(false);
|
||||
|
||||
print(`Event created: ${event.get_title()}`);
|
||||
|
||||
// Store the event
|
||||
print("Storing event...");
|
||||
let id = put_event(event);
|
||||
print(`✓ Event stored with ID: ${id}\n`);
|
||||
|
||||
// Retrieve the event
|
||||
print("Retrieving event...");
|
||||
let retrieved = get_event("test_calendar", id);
|
||||
print(`✓ Retrieved: ${retrieved.get_title()}\n`);
|
||||
|
||||
// Query by category
|
||||
print("Querying events by category...");
|
||||
let ids = query("test_calendar", "category", "testing");
|
||||
print("✓ Found events:");
|
||||
for id in ids {
|
||||
print(` - ${id}`);
|
||||
}
|
||||
|
||||
print("=== Test Complete ===");
|
||||
Reference in New Issue
Block a user