diff options
| author | Shulhan <ms@kilabit.info> | 2025-10-03 00:15:29 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2025-10-03 00:15:29 +0700 |
| commit | 1003a18b85cffac4b9a92ee787fd8a9bdfca072d (patch) | |
| tree | 2090d7c2b84dbd4cc39956145af3c070ba98f7ee /testdata | |
| parent | 276096698be34a7c629b3fe7bfd79c48e1c24921 (diff) | |
| download | awwan-1003a18b85cffac4b9a92ee787fd8a9bdfca072d.tar.xz | |
all: add option "$noparse" for magic "#put" command
The "$noparse" option allow copying file without reading and parsing
the input file.
Diffstat (limited to 'testdata')
| -rw-r--r-- | testdata/local/put.aww | 2 | ||||
| -rw-r--r-- | testdata/local/put.data | 4 | ||||
| -rw-r--r-- | testdata/play/awwanssh.test/put.aww | 2 | ||||
| -rw-r--r-- | testdata/play/awwanssh.test/put_test.data | 4 |
4 files changed, 12 insertions, 0 deletions
diff --git a/testdata/local/put.aww b/testdata/local/put.aww index c076bd7..82297e5 100644 --- a/testdata/local/put.aww +++ b/testdata/local/put.aww @@ -14,3 +14,5 @@ sudo chmod 0644 /etc/plain.txt #put!+0516 {{.ScriptDir}}/plain.txt /etc/sudoput_with_mode.txt #put!awwan:bin+0644 {{.ScriptDir}}/plain.txt /etc/sudoput_with_owner.txt + +#put:$noparse {{.ScriptDir}}/plain.txt {{.ScriptDir}}/tmp/plain_noparse.txt diff --git a/testdata/local/put.data b/testdata/local/put.data index e457391..db50a6d 100644 --- a/testdata/local/put.data +++ b/testdata/local/put.data @@ -2,6 +2,10 @@ The host name is encrypt. +<<< tmp/plain_noparse.txt +The host name is {{.Val "host::name"}}. + + <<< missing_val_encrypted Local: Copy: generateFileInput: template: missing_val_encrypted.txt:2:25: executing "missing_val_encrypted.txt" at <.Val>: error calling Val: "secret::pass" is empty diff --git a/testdata/play/awwanssh.test/put.aww b/testdata/play/awwanssh.test/put.aww index e419a4f..0f6aa8c 100644 --- a/testdata/play/awwanssh.test/put.aww +++ b/testdata/play/awwanssh.test/put.aww @@ -16,3 +16,5 @@ #put!awwan:bin {{.ScriptDir}}/plain.txt sudoput_with_owner.txt #put!awwan:bin+602 {{.ScriptDir}}/plain.txt sudoput_with_owner_mode.txt + +#put:+666$noparse {{.ScriptDir}}/plain.txt put_noparse.txt diff --git a/testdata/play/awwanssh.test/put_test.data b/testdata/play/awwanssh.test/put_test.data index 61ac09c..0dccc05 100644 --- a/testdata/play/awwanssh.test/put_test.data +++ b/testdata/play/awwanssh.test/put_test.data @@ -4,6 +4,10 @@ Test input and output for "#put". The host name is awwanssh.test. +<<< plain_noparse.txt +The host name is {{.Val "host::name"}}. + + <<< WithoutPermission:error Play: Put: Put: permission denied |
