tricu

An interpreted language for exploring Tree Calculus
Log | Files | Refs | README | LICENSE

consumer_registry_source_failures.tri (778B)


      1 !import "consumers.registry-source" RS
      2 !import "parser" P
      3 !import "prelude" !Local
      4 failureCode source code = matchResult (diagnostic _ : equal? (P.parserDiagnosticCode diagnostic) code) (_ _ : false) (RS.compileRouteSource source)
      5 main = matchBool "registry-diagnostics-ok" "registry-diagnostics-DIFFER" (foldl and? true
      6   [(failureCode "consumer registry GET \"/a/\" hash @ hash => reply 200 \"text/plain\" hash" 21)
      7    (failureCode "consumer registry GET \"/a/\" hash @ root => await read root unknown resume registry @ root" 22)
      8    (failureCode "consumer registry GET \"/a/\" hash @ root => await read root hash resume other @ root" 2)
      9    (failureCode "consumer registry GET \"/a\" @ _ => reply 200 \"text/plain\" missing" 22)
     10    (failureCode "consumer registry $" 4)])
     11 main