AS a user, I want to be able to type an expression without spaces #23

Open
opened 2025-09-20 13:10:10 +01:00 by Vylpes · 1 comment
Owner

Epic: #21
Story Points: 2


SO THAT the expression handler is less obtuse

Acceptance Criteria

GIVEN I am in the CLI mode
WHEN I type an expression with OR without spaces in it
THEN the expression handler will ignore the spaces

Subtasks

  • Update handler
  • Update tests
Epic: #21 Story Points: 2 --- SO THAT the expression handler is less obtuse ## Acceptance Criteria GIVEN I am in the CLI mode WHEN I type an expression with OR without spaces in it THEN the expression handler will ignore the spaces ## Subtasks - [ ] Update handler - [ ] Update tests
Vylpes added this to the 0.1.0 milestone 2025-09-20 13:10:10 +01:00
Vylpes changed title from Support without spaces to AS a user, I want to be able to type an expression without spaces 2025-10-30 18:59:34 +00:00
Member

Test Plan

Generated test plan for #23. Fill in Actual Results and Notes during testing.

Test Plan: #23 — AS a user, I want to be able to type an expression without spaces

Issue: #23
Generated: 2026-06-29
Milestone: 0.1.0

Summary

Verify that the CLI expression handler accepts arithmetic input with or without spaces, treating whitespace as ignorable while preserving existing spaced-expression behavior and error handling.

Test Cases

Id Description Expected Results Actual Results Notes
23-0001 Start interactive CLI (calculator cli). Enter 2 + 3 Output shows = 5 Acceptance criterion — with spaces
23-0002 In interactive CLI, enter 2+3 Output shows = 5 Acceptance criterion — without spaces
23-0003 Run calculator cli "2+3" (single-expression mode) Prints 5 to stdout Without spaces, non-interactive
23-0004 In interactive CLI, enter 10-4 Output shows = 6 Subtraction without spaces
23-0005 In interactive CLI, enter 3*7 Output shows = 21 Multiplication without spaces
23-0006 In interactive CLI, enter 15/3 Output shows = 5 Division without spaces
23-0007 In interactive CLI, enter 2 + 3 (multiple spaces) Output shows = 5 Spaces are ignored, not required
23-0008 In interactive CLI, enter each spaced expression: 2 + 3, 10 - 4, 3 * 7, 15 / 3 Each evaluates to 5, 6, 21, and 5 respectively Regression — spaced input still works
23-0009 In interactive CLI, enter 5/0 Error message: division by zero Error handling unchanged
23-0010 In interactive CLI, enter 2+ Error message: invalid expression Malformed input without spaces
23-0011 In interactive CLI, enter invalid Error message: invalid expression Non-numeric input rejected
23-0012 Run calculator cli "2 + 3" (single-expression mode, with spaces) Prints 5 to stdout Regression — spaced single-expression mode
## Test Plan Generated test plan for #23. Fill in **Actual Results** and **Notes** during testing. # Test Plan: #23 — AS a user, I want to be able to type an expression without spaces **Issue:** https://git.vylpes.xyz/RabbitLabs/calculator/issues/23 **Generated:** 2026-06-29 **Milestone:** 0.1.0 ## Summary Verify that the CLI expression handler accepts arithmetic input with or without spaces, treating whitespace as ignorable while preserving existing spaced-expression behavior and error handling. ## Test Cases | Id | Description | Expected Results | Actual Results | Notes | |----|-------------|------------------|----------------|-------| | 23-0001 | Start interactive CLI (`calculator cli`). Enter `2 + 3` | Output shows `= 5` | | Acceptance criterion — with spaces | | 23-0002 | In interactive CLI, enter `2+3` | Output shows `= 5` | | Acceptance criterion — without spaces | | 23-0003 | Run `calculator cli "2+3"` (single-expression mode) | Prints `5` to stdout | | Without spaces, non-interactive | | 23-0004 | In interactive CLI, enter `10-4` | Output shows `= 6` | | Subtraction without spaces | | 23-0005 | In interactive CLI, enter `3*7` | Output shows `= 21` | | Multiplication without spaces | | 23-0006 | In interactive CLI, enter `15/3` | Output shows `= 5` | | Division without spaces | | 23-0007 | In interactive CLI, enter `2 + 3` (multiple spaces) | Output shows `= 5` | | Spaces are ignored, not required | | 23-0008 | In interactive CLI, enter each spaced expression: `2 + 3`, `10 - 4`, `3 * 7`, `15 / 3` | Each evaluates to `5`, `6`, `21`, and `5` respectively | | Regression — spaced input still works | | 23-0009 | In interactive CLI, enter `5/0` | Error message: division by zero | | Error handling unchanged | | 23-0010 | In interactive CLI, enter `2+` | Error message: invalid expression | | Malformed input without spaces | | 23-0011 | In interactive CLI, enter `invalid` | Error message: invalid expression | | Non-numeric input rejected | | 23-0012 | Run `calculator cli "2 + 3"` (single-expression mode, with spaces) | Prints `5` to stdout | | Regression — spaced single-expression mode |
Vylpes referenced this issue from a commit 2026-06-29 15:32:48 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
RabbitLabs/calculator#23
No description provided.