Skip to content

${...} substitution #76

@HolQue

Description

@HolQue

Reference: #69

I tried some use cases:

"str1" : "ABC",
"str2" : "DEF",
"str3" : ${str1},
"list" : ["A", "B", "C"],

// "str4" : ${str1}_test_${str2}
// -> Expecting ',' delimiter

// "str5" : "${str1}_test_${str2}"
// -> Expecting ',' delimiter

// ${str1}_test_${str2} : "MNO",
// -> Expecting property name enclosed in double quotes

// "${str2}_test_${str3}" : "SPQR"
// -> Expecting ':' delimiter

// "${str1}_test_${list}" : "XYZ"
// -> Expecting ':' delimiter
  • str1 - list are successful.
  • str4 and str5 cause an error.

What shall be the desired implementation in case of multiple substitutions on the right hand side of the colon: expression encapsulated in quotes or not?

Same question in case of multiple substitutions on the left hand side of the colon: expression encapsulated in quotes or not?

Both causes errors.

The last example contains a composite data type ${list} on the left hand side of the colon. As per
#69 (comment)
this should not be allowed. But the issue comment is related to the Testsuites Management. For me the question now is: Shall the JsonPreprocessor react in the same way or shall the JsonPreprocessor allow composite data types on the left hand side of the colon?

Nevertheless: The error message should not tell about a missing delimiter. This is not helpful.

Metadata

Metadata

Assignees

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions