HomeDevCentral

Correct behavior for `registry incr`

Description

Correct behavior for registry incr

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

Reviewers: dereckson

Maniphest Tasks: T793

Differential Revision: http://devcentral.nasqueron.org/D349

Details

Provenance
derecksonAuthored on Mar 27 2016, 16:24
Differential Revision
D349: Correct behavior for `registry incr`
Parents
rVIPER2f988c8ee7f2: Core: remove debug information from registry delete
Branches
Unknown
Tags
Unknown
Tasks
T793: registry incr <variable> <term> issue