diesel-spec Pub

Diesel parms

$when:: test.diesel.putPayload
   ctx.echo
   . (payload=[1,2,3])
   ctx.echo

$when:: test.diesel.usePayload
   . (payload=[])
   test.diesel.putPayload
   ctx.echo (m=payload[="...)
   step this will set "one" on the parent scope, propagating it outside this rule
   . (dieselScope[="one"]=payload[="0"=0])

spec vals evaluated later:

v20 should be x11 not just x

val v16="x${v15}"="x${v15}"

$when:: testdiesel.specvals1
   . (v15=11)
   . (v20=v16)

$when:: testdiesel.specvals2
   . (v15=22)
   . (v20=v16)

Happy

$when:: testdiesel.bug.nohappypath (a61 is 61)
   . (a31=31)

parameter targets

$when:: test.diesel.dp1
   . (p36=36)

$when:: test.diesel.dp11
   . (p39=39)
   ctx.log (p39)

$when:: test.diesel.dp2
   . (p43=42)
   . (dieselScope[="p43"]=43)
   . (dieselScope[="p44"]=p43)
   . (dieselScope[="p45"]=dieselScope[="p43"])
   . (dieselScope[="p46"]=p43)

$when:: test.diesel.dp3
   . (dieselRoot[="p49"]=49)

$when:: test.diesel.dp4
   . (diesel[="realm"][="props"][="p52"]=52)
   . (dieselRealm[="p53"]=53)

return

$when:: test.diesel.ret1
   diesel.rule.return
   . (p59=59)

$when:: test.diesel.ret2
   diesel.scope.return
   . (p63=63)

$when:: test.diesel.ret3
   diesel.flow.return
   . (p67=67)

0 $mock:: test.diesel.snakkSomething
   snakk.text (url="/"="/")
   . (payload=replaceAll(source=payload,pattern:String="script"="script",replacement:String="no hacking allowed"="no hacking allowed"))
   . (y76=test.diesel.hackitanyways(x=payload))
   . (payload=y76)

0 $mock:: test.diesel.hackitanyways (x)
   . (payload=replaceAll(source=x,pattern:String="no hacking"="no hacking",replacement:String="hacking"="hacking"))


Was this useful?    

By: Razie | 2020-05-29 .. 2022-06-17 | Tags: spec , dsl , private


Viewed 569 times ( | History | Print ) this page.

You need to log in to post a comment!

© Copyright DieselApps, 2012-2024, all rights reserved.