Add new acceptance test scenario: 036
``` Error: × Main thread panicked. ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/aiken- │ project/src/lib.rs:567:36 ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "_not", unique: Unique(17) }) ```
This commit is contained in:
parent
1701cacb52
commit
4f83d4fa1b
|
@ -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 = "6b482fa00ec37fe936c93155e8c670f32288a686"
|
||||||
|
source = "github"
|
||||||
|
|
||||||
|
[[packages]]
|
||||||
|
name = "aiken-lang/stdlib"
|
||||||
|
version = "6b482fa00ec37fe936c93155e8c670f32288a686"
|
||||||
|
requirements = []
|
||||||
|
source = "github"
|
|
@ -0,0 +1,6 @@
|
||||||
|
name = "aiken-lang/acceptance_test_036"
|
||||||
|
version = "0.0.0"
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
{ name = "aiken-lang/stdlib", version = "6b482fa00ec37fe936c93155e8c670f32288a686", source = "github" },
|
||||||
|
]
|
|
@ -0,0 +1,18 @@
|
||||||
|
use aiken/dict
|
||||||
|
use aiken/list
|
||||||
|
use aiken/transaction.{Output, ScriptContext}
|
||||||
|
use aiken/transaction/value.{PolicyId}
|
||||||
|
|
||||||
|
const my_policy_id: PolicyId = #[0, 0, 0, 0, 0]
|
||||||
|
|
||||||
|
pub fn has_policy_id(self: Output, policy_id: PolicyId) -> Bool {
|
||||||
|
self.value
|
||||||
|
|> value.tokens(policy_id)
|
||||||
|
|> dict.is_empty
|
||||||
|
|> not
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn spend(_datum, _redeemer, ctx: ScriptContext) -> Bool {
|
||||||
|
ctx.transaction.outputs
|
||||||
|
|> list.any(has_policy_id(_, my_policy_id))
|
||||||
|
}
|
|
@ -15,7 +15,13 @@ WORKDIR="$(dirname -- "${BASH_SOURCE[0]}")"
|
||||||
TARGET="$WORKDIR/$(basename $1)"
|
TARGET="$WORKDIR/$(basename $1)"
|
||||||
|
|
||||||
TMP=$(mktemp)
|
TMP=$(mktemp)
|
||||||
RESULT=$(cargo run --quiet -- check $TARGET 2>$TMP)
|
VALIDATORS=$(find $TARGET -type f -path "*validators/*.ak")
|
||||||
|
if [ -z $VALIDATORS ]; then
|
||||||
|
RESULT=$(cargo run --quiet -- check $TARGET 2>$TMP)
|
||||||
|
else
|
||||||
|
RESULT=$(cargo run --quiet -- build $TARGET 2>$TMP)
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
echo "✅ $(basename $TARGET)"
|
echo "✅ $(basename $TARGET)"
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
find . -regex ".*[0-9]\{3\}" -type d | xargs -P 8 -I {} -- ./run.sh {}
|
find . -regex ".*[0-9]\{3\}" -type d | xargs -P 8 -I {} -- ./run {}
|
||||||
|
|
Loading…
Reference in New Issue