Menu

#630 if clauses accept command sequences

v1.1.x
fixed
v1.1.3
Bug Fix
2022-01-19
2021-08-24
Erik Hänel
No

if clauses seem to accept command sequences like read FILE and execute without an error. However, it seems that it this sequences is simply ignored.

Analysis:

The issue is that the command sequences are only accepted, if they contain strings. Then, they will be evaluated as strings, where the string parser is very tolerant regarding string errors. The function handling the string concatenation should instead validate the input and throw an error.

Implementation:

  • Implementation: Implemented as proposed by the analysis.
  • Revision: [r1004]
  • Implementation test: The command sequence was used as part of an if statement. An error was thrown as expected.

Documentation:

  • ChangesLog updated
  • Code changes commented
  • Documentation articles:
    • corresponding documentation articles updated
    • new documentation articles created
    • not needed
  • Language files:
    • corresponding language files updated
    • not needed

Tests:

The fix was tested manually. No deviation was detected.

Related

Commit: [r1004]

Discussion

  • Erik Hänel

    Erik Hänel - 2021-08-24
    • labels: --> internal, ctrlflow, cmd
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2021-08-24
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     `if` clauses seem to accept command sequences like `read FILE` and execute without an error. However, it seems that it this sequences is simply ignored.
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     
  • Erik Hänel

    Erik Hänel - 2021-09-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     `if` clauses seem to accept command sequences like `read FILE` and execute without an error. However, it seems that it this sequences is simply ignored.
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +The issue is that the command sequences are only accepted, if they contain strings. Then, they will be evaluated as strings, where the string parser is very tolerant regarding string errors. The function handling the string concatenation should instead validate the input and throw an error.
    
     ###Implementation:
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
     
  • Erik Hänel

    Erik Hänel - 2021-09-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,20 +4,20 @@
     The issue is that the command sequences are only accepted, if they contain strings. Then, they will be evaluated as strings, where the string parser is very tolerant regarding string errors. The function handling the string concatenation should instead validate the input and throw an error.
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented as proposed by the analysis.
    +* Revision: [r1004]
    +* Implementation test: The command sequence was used as part of an `if` statement. An error was thrown as expected.
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
         * [ ] corresponding language files updated
    -    * [ ] not needed
    +    * [x] not needed
    
     ###Tests:
     (*Describe, which tests you performed and their outcome*)
    
    • status: implementing --> testing
     

    Related

    Commit: [r1004]

  • Erik Hänel

    Erik Hänel - 2022-01-19
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
         * [x] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +The fix was tested manually. No deviation was detected.
    
    • status: testing --> fixed
     

Anonymous
Anonymous

Add attachments
Cancel