FHIR Chat · Escaping Strings · shorthand

Stream: shorthand

Topic: Escaping Strings


view this post on Zulip Patrick Werner (Nov 27 2020 at 09:47):

TLDR: don't forget the whitespace between path and =

When building a TestScript instance using variables like: ${resourceId} i get the following sushi error:
mismatched input '"${resourceId}"' expecting {'units', '='} So i think i have to escape, but couldn't figure out how. Line in the FSH file:
* test[0].action[3].assert.value= "${resourceId}"

view this post on Zulip Patrick Werner (Nov 27 2020 at 12:50):

i changed the line to:
* test[0].action[3].assert.value= "resourceId"

view this post on Zulip Patrick Werner (Nov 27 2020 at 12:50):

still getting an error:

error mismatched input '"resourceId"' expecting {'units', '='}
  File: /Users/patrickwerner/Documents/GematikTest/input/fsh/Testscript.fsh
  Line: 31

view this post on Zulip Patrick Werner (Nov 27 2020 at 12:53):

oh! i added a whitespace between the path and the =which fixed the error.

view this post on Zulip Chris Moesel (Nov 29 2020 at 19:41):

Yeah, you're not the first one who has been surprised by that. We should probably try to handle that better by intercepting error messages like that and translating them to something more human-friendly. Sorry about that!

view this post on Zulip Chris Moesel (Nov 29 2020 at 19:43):

SUSHI #682


Last updated: Apr 12 2022 at 19:14 UTC