diff options
| author | Shulhan <ms@kilabit.info> | 2022-07-26 23:58:26 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-07-27 00:47:52 +0700 |
| commit | 1ec783315f991e9f57f0a4abcd0eb6db5d809028 (patch) | |
| tree | 126907d78e9bd16dd130311683a6bd45efe03d5a /lib/ini/testdata/get_complex_test.txt | |
| parent | ac21646637b59aca1de28c0bd72260a01302da61 (diff) | |
| download | pakakeh.go-1ec783315f991e9f57f0a4abcd0eb6db5d809028.tar.xz | |
lib/ini: fix parsing and saving multi line variables
Previously, if INI file contains multi line variables, for example
key = a \
b
The Get and saved value is "a \tb", where it should be "a b" for Get and
"a \\\n\t\b" again when saved.
This changes require refactoring how the variable's value is parsed and
stored.
A variable value is parsed and stored from character after "=" until new
line or comment as raw value, and the real value is derived by trimming
white spaces, handle escaped character and double quotes.
Diffstat (limited to 'lib/ini/testdata/get_complex_test.txt')
| -rw-r--r-- | lib/ini/testdata/get_complex_test.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ini/testdata/get_complex_test.txt b/lib/ini/testdata/get_complex_test.txt index 60929cfe..aeb348eb 100644 --- a/lib/ini/testdata/get_complex_test.txt +++ b/lib/ini/testdata/get_complex_test.txt @@ -222,9 +222,9 @@ codereview mail. codereview pending. codereview submit. codereview sync. -!git --no-pager log --graph --date=format:'%Y-%m-%d' --pretty=format:'%C(auto,dim)%ad %<(7,trunc) %an %Creset%m %h %s %Cgreen%d%Creset' --exclude=*/production --exclude=*/dev-* --all -n 20. -!git stash -u && git fetch origin && git rebase origin/master && git stash pop && git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit origin/master~1..HEAD. -!git stash -u && git fetch origin && git rebase origin/production && git stash pop && git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit origin/production~1..HEAD. +!git --no-pager log --graph --date=format:'%Y-%m-%d' --pretty=format:'%C(auto,dim)%ad %<(7,trunc) %an %Creset%m %h %s %Cgreen%d%Creset' --exclude=*/production --exclude=*/dev-* --all -n 20. +!git stash -u && git fetch origin && git rebase origin/master && git stash pop && git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit origin/master~1..HEAD. +!git stash -u && git fetch origin && git rebase origin/production && git stash pop && git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit origin/production~1..HEAD. https://github.com/. |
