From 726ff63ec6d084f2ef4d65b084ef204d5fcc5eb0 Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Sat, 12 Jan 2019 16:50:26 +0200 Subject: Test case for -endpoints switch --- tests/endpoints.ur | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tests/endpoints.ur (limited to 'tests/endpoints.ur') diff --git a/tests/endpoints.ur b/tests/endpoints.ur new file mode 100644 index 00000000..ddb91faa --- /dev/null +++ b/tests/endpoints.ur @@ -0,0 +1,40 @@ +fun formbased (): transaction page = + return + +
+ + + + + + +
+ +and formbased_handler (r : {Nam : string, Msg : string, Sameday : bool}) : transaction page = + return + +

Oh hello {[r.Nam]}! Great to see you here again!

+

Your message was:

+

{[r.Msg]}

+

Sameday delivery was:

+

{[if r.Sameday then "set" else "unset"]}

+ +
+ +fun say_hi_to (s : string) : transaction page = +return + +

It's {[s]} birthday!

+ +
+ +fun optimized_out (): transaction page = + return this one is optimized away since it's not referenced in the declarations + +fun main (): transaction page = + return + +

hello

+

Say hi to JC

+ +
-- cgit v1.2.3