From a0c9e5e87e951df4d1bc86c6ccc2ed73dbe7f942 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Thu, 12 Oct 2023 01:34:59 +0700 Subject: all: add integration tests for magic command "#get!" --- testdata/local/get.aww | 2 ++ testdata/local/get.data | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'testdata') diff --git a/testdata/local/get.aww b/testdata/local/get.aww index 15878c6..d889f22 100644 --- a/testdata/local/get.aww +++ b/testdata/local/get.aww @@ -1 +1,3 @@ #get: {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/get_plain.txt + +#get! /etc/os-release {{.ScriptDir}}/tmp/os-release diff --git a/testdata/local/get.data b/testdata/local/get.data index 0e7ee57..c0e24ec 100644 --- a/testdata/local/get.data +++ b/testdata/local/get.data @@ -1,5 +1,18 @@ -Test on magic command "#get:". +Test output from magic command "#get:" and "#get!" <<< tmp/get_plain.txt The host name is {{.Val "host::name"}}. + +<<< tmp/os-release +NAME="Arch Linux" +PRETTY_NAME="Arch Linux" +ID=arch +BUILD_ID=rolling +ANSI_COLOR="38;2;23;147;209" +HOME_URL="https://archlinux.org/" +DOCUMENTATION_URL="https://wiki.archlinux.org/" +SUPPORT_URL="https://bbs.archlinux.org/" +BUG_REPORT_URL="https://bugs.archlinux.org/" +PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/" +LOGO=archlinux-logo -- cgit v1.3