Run these tests manually using the built binary. Each test describes what to run, what to check, and when to ask the user for help.
Use nanocal from ~/bin/nanocal (the installed release build).
Before starting, verify the binary is installed and working:
nanocal helpExpect: usage text listing all commands (calendars, events, today, upcoming, show, create, update, delete, help) and global options (--json).
nanocal calendarsCheck:
- Columnar output: CALENDAR, TYPE, WRITABLE
- At least one calendar listed
- Types are recognizable (local, calDAV, subscription, birthday, etc.)
- Writable is "yes" or "no"
- No raw JSON
nanocal calendars --jsonCheck:
- Valid JSON array
- Each object has: identifier (string), title (string), type (string), writable (boolean), color (string starting with #)
nanocal todayCheck:
- Shows today's events grouped under a date header (e.g., "Today, Wednesday, Mar 4, 2026")
- Each event shows time range (HH:MM – HH:MM), title, and [Calendar]
- All-day events show "(all day)" instead of time range
- No event IDs shown by default
- If no events: "No events found."
- No raw JSON
nanocal today --idsCheck:
- Same output as 2a but each event has an indented "ID: " line below it
- IDs are UUID strings
Without --ids:
nanocal todayCheck:
- No ID lines shown
nanocal today --jsonCheck:
- Valid JSON array
- Each object has: id, title, startDate, endDate, isAllDay, calendar
- Dates are ISO 8601 strings with fractional seconds
Pick a calendar name from the calendars output.
nanocal today -c "<CalendarName>"Check:
- Only events from that calendar are shown
- Events from other calendars are excluded
nanocal upcomingCheck:
- Shows events for the next 7 days
- Events grouped by day with date headers
- Multiple days visible (if events exist across days)
nanocal upcoming --days 14Check:
- Shows events up to 14 days out
- May include more events than the 7-day default
nanocal upcoming --search "meeting" --days 30Check:
- Only events matching "meeting" in title, location, notes, or attendees
- If no matches: "No events found."
nanocal upcoming --limit 2
nanocal upcoming --limit 2 --offset 2Check:
- First command returns at most 2 events
- Second command returns different events (no overlap)
- If fewer than 4 upcoming events, ask the user to create a few test events
nanocal events --from "2026-01-01" --to "2026-03-01"Check:
- Shows events in the specified range
- Events grouped by day
- No events outside the date range
nanocal eventsCheck:
- Same results as
nanocal today
nanocal events --from "2026-01-01" --to "2026-03-01" --jsonCheck:
- Valid JSON array of event summaries
- All dates within the specified range
nanocal events --from "2026-01-01" --to "2026-12-31" -c "<CalendarName>" --search "test"Check:
- Only events from the specified calendar matching "test"
Pick an event ID from any of the above commands (use --ids or --json to get the id field).
nanocal show --id "<EVENT-ID>"Check:
- Shows full event details: title, when, calendar, location, status, availability
- Shows attendees if present (name, email, status, role)
- Shows notes, URL, organizer, recurrence if present
- Shows event ID at the bottom
nanocal show --id "<EVENT-ID>" --jsonCheck:
- Valid JSON object
- Has all fields: id, title, startDate, endDate, isAllDay, calendar, status, availability
- Optional fields present when applicable: location, notes, url, attendees, organizer, recurrence
nanocal show --id "nonexistent-id-12345" 2>&1Check:
- Error on stderr: "nanocal: event not found: nonexistent-id-12345"
- Non-zero exit code
Only run these if the user explicitly approves creating test events.
nanocal create 2>&1
nanocal create -c "Work" 2>&1
nanocal create -c "Work" --title "Test" 2>&1Check:
- First errors about missing -c
- Second errors about missing --title
- Third errors about missing --start
Ask the user for a writable calendar name.
nanocal create -c "<Calendar>" --title "nanocal test event" --start "2026-12-25T10:00:00" --end "2026-12-25T11:00:00" --location "Test Location" --notes "Created by nanocal test"Check:
- Output: "Created: nanocal test event" with date and calendar info
- Save the event ID for update/delete tests
nanocal create -c "<Calendar>" --title "nanocal JSON test" --start "2026-12-26T10:00:00" --end "2026-12-26T11:00:00" --jsonCheck:
- Valid JSON with event summary fields
Use the event ID from the create test.
nanocal update --id "<EVENT-ID>" --title "nanocal UPDATED test event" --location "New Location"Check:
- Output: "Updated: nanocal UPDATED test event" with date and calendar
- Title and location reflect the changes
nanocal update --title "test" 2>&1Check:
- Error: "nanocal: update requires --id"
Use the event IDs from the create tests.
nanocal delete --id "<EVENT-ID>"Check:
- Output: "Deleted: "
nanocal show --id "<EVENT-ID>" 2>&1Check:
- Error: "nanocal: event not found: "
nanocal delete 2>&1Check:
- Error: "nanocal: delete requires --id"
nanocal helpCheck:
- Lists all commands
- Shows --json as a global option
nanocal help events
nanocal help create
nanocal help showCheck:
- Each shows usage, description, and options
eventsmentions --from, --to, -c, --search, --limit, --offsetcreatementions -c, --title, --start, --end, --allday, --location, --notes, --urlshowmentions --id
nanocal --help
nanocal -hCheck:
- Both show the same global help as
nanocal help
nanocalCheck:
- Shows usage help (same as
nanocal help)
nanocal foobar 2>&1Check:
- Error on stderr: "nanocal: unknown command: foobar"
- Exit code is non-zero
Try to create an event in a read-only calendar (e.g., "Birthdays" or a subscription calendar):
nanocal create -c "Birthdays" --title "Test" --start "2026-12-25T10:00:00" --end "2026-12-25T11:00:00" 2>&1Check:
- Error about calendar being read-only
- No event created