From b63e8ae62b2747f02e1e8ee1af08c3e89ff336de Mon Sep 17 00:00:00 2001 From: ascandone Date: Thu, 1 Oct 2026 11:33:54 +0200 Subject: [PATCH] test: pin interpolation of an account var whose origin is another account --- .../interpolated-account-alias.num | 7 +++++++ .../interpolated-account-alias.num.specs.json | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num create mode 100644 internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num.specs.json diff --git a/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num b/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num new file mode 100644 index 00000000..b8f1c410 --- /dev/null +++ b/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num @@ -0,0 +1,7 @@ +vars { + account $a = @src +} +send [USD/2 10] ( + source = @world + destination = @dest:$a +) diff --git a/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num.specs.json b/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num.specs.json new file mode 100644 index 00000000..1f029aeb --- /dev/null +++ b/internal/interpreter/testdata/script-tests/experimental/account-interpolation/interpolated-account-alias.num.specs.json @@ -0,0 +1,19 @@ +{ + "$schema": "https://raw.githubusercontent.com/formancehq/numscript/main/v1.specs.schema.json", + "featureFlags": [ + "experimental-account-interpolation" + ], + "testCases": [ + { + "it": "interpolates the name of an account var whose origin is another account", + "expect.postings": [ + { + "source": "world", + "destination": "dest:src", + "amount": 10, + "asset": "USD/2" + } + ] + } + ] +}