Bug 489269 - Math chaining is broken
Summary: Math chaining is broken
Status: RESOLVED UPSTREAM
Alias: None
Product: kcalc
Classification: Applications
Component: general (show other bugs)
Version: 24.05.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-27 00:19 UTC by Mark
Modified: 2024-08-19 15:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2024-06-27 00:19:37 UTC
SUMMARY
type 1+1 <enter> then +1. Result = 1. Seriously!

STEPS TO REPRODUCE
1. type 1+1
2. enter
3. type +1

OBSERVED RESULT
1

EXPECTED RESULT
3

ADDITIONAL INFORMATION
I'm expecting the (completely unnecessary) restyle to have broken this.
Comment 1 Mark 2024-06-27 00:24:45 UTC
And closed... The current git version doesn't have this bug.
Comment 2 Gabriel Barrantes 2024-06-27 01:13:58 UTC
(In reply to Mark from comment #1)
> And closed... The current git version doesn't have this bug.
Thanks.
Comment 3 Mark 2024-08-17 13:29:24 UTC
To amend. I just went over the code a little and i did notice you have testcases. It is probably smart to add a testcase that tests for this kind of math chaining (with enters in between). All current tests, as far as i understand them, seem to be solving just one sum and checking it's output.
Comment 4 Gabriel Barrantes 2024-08-19 15:06:40 UTC
(In reply to Mark from comment #3)
> To amend. I just went over the code a little and i did notice you have
> testcases. It is probably smart to add a testcase that tests for this kind
> of math chaining (with enters in between). All current tests, as far as i
> understand them, seem to be solving just one sum and checking it's output.

Already done in https://invent.kde.org/utilities/kcalc/-/blob/master/appiumtests/chain_results_test.py?ref_type=heads