diff options
| author | Shulhan <ms@kilabit.info> | 2022-07-23 16:56:33 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-07-23 16:56:33 +0700 |
| commit | 7c11f5897a1d6bd525f67f51a3639ce24bc266ce (patch) | |
| tree | 1b2d22db66b38cd40e8254936175589d3dcf3c0e /lib/ini/testdata/struct/struct_test.txt | |
| parent | c80513b67f83f40f243c46c500d67a81f5b96df2 (diff) | |
| download | pakakeh.go-7c11f5897a1d6bd525f67f51a3639ce24bc266ce.tar.xz | |
lib/test: load test data files with suffix "_test.txt"
Previously, the LoadDataDir load all files from directory that have
".txt" extension.
This may cause unknown non-test data files loaded and may cause an error.
To distinguish it with other text files, inside the directory to be loaded
load only the file that has suffix "_test.txt".
Diffstat (limited to 'lib/ini/testdata/struct/struct_test.txt')
| -rw-r--r-- | lib/ini/testdata/struct/struct_test.txt | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/lib/ini/testdata/struct/struct_test.txt b/lib/ini/testdata/struct/struct_test.txt new file mode 100644 index 00000000..d0c4cbcf --- /dev/null +++ b/lib/ini/testdata/struct/struct_test.txt @@ -0,0 +1,57 @@ +kind: struct + +Test Unmarshal-ing with some primitive types. + +>>> +[section "struct"] +string = struct +int = 1 + +[section "ptr_struct"] +string = ptr_struct +int = 2 + +[section "ptr_struct_nil"] +string = ptr_struct_nil +int = 3 + +[section] +string = a string +int = 4 +bool = true +duration = 4m +time = 2021-02-28 00:12:04 + +[section "pointer"] +string = pointer to string +int = 5 +bool = true +duration = 5m +time = 2021-02-28 00:12:05 + +<<< +[section] +time = 2021-02-28 00:12:04 +string = a string +duration = 4m0s +int = 4 +bool = true + +[section "pointer"] +bool = true +duration = 5m0s +int = 5 +string = pointer to string +time = 2021-02-28 00:12:05 + +[section "ptr_struct"] +string = ptr_struct +int = 2 + +[section "ptr_struct_nil"] +string = ptr_struct_nil +int = 3 + +[section "struct"] +string = struct +int = 1 |
