From 8fabfd112e1cb3daf8b7f570e66326c72c5114cf Mon Sep 17 00:00:00 2001 From: KtorZ Date: Thu, 16 Feb 2023 14:46:37 +0100 Subject: [PATCH] Add new acceptance test scenario: 063 --- examples/acceptance_tests/063/aiken.lock | 13 +++++++++++++ examples/acceptance_tests/063/aiken.toml | 8 ++++++++ examples/acceptance_tests/063/lib/tests.ak | 17 +++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 examples/acceptance_tests/063/aiken.lock create mode 100644 examples/acceptance_tests/063/aiken.toml create mode 100644 examples/acceptance_tests/063/lib/tests.ak diff --git a/examples/acceptance_tests/063/aiken.lock b/examples/acceptance_tests/063/aiken.lock new file mode 100644 index 00000000..0423f31b --- /dev/null +++ b/examples/acceptance_tests/063/aiken.lock @@ -0,0 +1,13 @@ +# This file was generated by Aiken +# You typically do not need to edit this file + +[[requirements]] +name = "aiken-lang/stdlib" +version = "main" +source = "github" + +[[packages]] +name = "aiken-lang/stdlib" +version = "main" +requirements = [] +source = "github" diff --git a/examples/acceptance_tests/063/aiken.toml b/examples/acceptance_tests/063/aiken.toml new file mode 100644 index 00000000..1b2e4d85 --- /dev/null +++ b/examples/acceptance_tests/063/aiken.toml @@ -0,0 +1,8 @@ +name = 'aiken-lang/acceptance_test_061' +version = '0.0.0' +description = '' + +[[dependencies]] +name = 'aiken-lang/stdlib' +version = 'main' +source = 'github' diff --git a/examples/acceptance_tests/063/lib/tests.ak b/examples/acceptance_tests/063/lib/tests.ak new file mode 100644 index 00000000..e6175dd0 --- /dev/null +++ b/examples/acceptance_tests/063/lib/tests.ak @@ -0,0 +1,17 @@ +fn must_be_signed(signatories) { + when signatories is { + [] -> { + trace "no signatories" + False + } + [sig, ..] -> (sig == "#ffff")? + } +} + +fn must_say_hello(msg) { + msg == "Hello, World!" +} + +test foo() { + must_be_signed(["#f000"])? && must_say_hello("Hello, World!")? || True +}