From 71b40922e6b6cc4f2d4b3fa94cbe586720bf6f8c Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 16 Jan 2024 22:00:38 +0700 Subject: all: refactoring "env-set" arguments Previously, the "env-set" take the file argument as the last argument and optional. This changes move the file argument to the first argument so the bash completion can detect and print the completion for list of keys. While at it, fix handling key with quoted in EnvSet and EnvGet. Closes: https://todo.sr.ht/~shulhan/awwan/10 --- testdata/env_set_test.data | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'testdata/env_set_test.data') diff --git a/testdata/env_set_test.data b/testdata/env_set_test.data index ec23bbc..b564789 100644 --- a/testdata/env_set_test.data +++ b/testdata/env_set_test.data @@ -1,5 +1,8 @@ Test input and output for EnvSet. +<<< withEmptyFile:error +EnvSet: empty file + <<< withEmptyKey:error EnvSet: empty key @@ -17,14 +20,15 @@ EnvSet: missing name in key name = awwan -<<< withEmptyFile +<<< withOverwriteValue [host] -name = awwan -ip_internal = 127.0.0.1 +name = overwrite -<<< withOverwriteValue +<<< withQuotedString [host] name = overwrite -ip_internal = 127.0.0.1 + +[host "my"] +name = my-host -- cgit v1.3