Page MenuHomeDevCentral

Correct behavior for `registry incr`
ClosedPublic

Authored by dereckson on Mar 27 2016, 16:26.
Tags
None
Referenced Files
F3715911: D349.diff
Tue, Nov 5, 10:59
Unknown Object (File)
Sat, Nov 2, 07:51
Unknown Object (File)
Tue, Oct 15, 10:53
Unknown Object (File)
Sun, Oct 13, 23:15
Unknown Object (File)
Wed, Oct 9, 19:10
Unknown Object (File)
Tue, Oct 8, 21:26
Unknown Object (File)
Oct 2 2024, 05:17
Unknown Object (File)
Oct 2 2024, 05:17
Subscribers
None

Details

Summary

The proc didn't support registry incr <variable> <term>,
only registry incr <variable>.

Fixes T793.

Test Plan

Actual incrementation

  • Increment a non existing variable
  • Increment the same variable with the default term 1
  • Increment the same variable with an arbitrary term
  • Ensure the final value is correct

Error handling

  • Increment with a non integer term

Tested on Wearg

16:22:08 <Dereckson> .s Core
16:22:09 <Dereckson> .tcl registry incr quux
16:22:09 <Wearg> Tcl: 
16:22:12 <Dereckson> .tcl registry incr quux
16:22:12 <Wearg> Tcl: 
16:22:13 <Dereckson> .tcl registry incr quux
16:22:13 <Wearg> Tcl: 
16:22:14 <Dereckson> .tcl registry incr quux
16:22:14 <Wearg> Tcl: 
16:22:16 <Dereckson> .tcl registry incr quux 9
16:22:16 <Wearg> Tcl: 
16:22:18 <Dereckson> .tcl registry incr quux foo
16:22:18 <Wearg> Tcl error: The increment term must be integer.
16:22:29 <Dereckson> .tcl registry get quux
16:22:29 <Wearg> Tcl: 13

Diff Detail

Repository
rVIPERSERV ViperServ scripts [legacy Mercurial repo]
Lint
No Lint Coverage
Unit
No Test Coverage
Branch
registry-incr (bookmark) on default (branch)
Build Status
Buildable 460
Build 575: arc lint + arc unit

Event Timeline

dereckson retitled this revision from to Correct behavior for `registry incr`.
dereckson updated this object.
dereckson edited the test plan for this revision. (Show Details)
dereckson added a reviewer: dereckson.
dereckson added inline comments.
Core.tcl
234

an integer

dereckson edited edge metadata.
dereckson marked an inline comment as done.
dereckson edited edge metadata.

Fix error message

This revision is now accepted and ready to land.Mar 27 2016, 16:29
This revision was automatically updated to reflect the committed changes.