File: env_tomap_test.go

package info (click to toggle)
golang-github-caarlos0-env 11.3.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 240 kB
  • sloc: makefile: 29
file content (16 lines) | stat: -rw-r--r-- 352 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//go:build !windows

package env

import "testing"

func TestUnix(t *testing.T) {
	envVars := []string{":=/test/unix", "PATH=:/test_val1:/test_val2", "VAR=REGULARVAR", "FOO=", "BAR"}
	result := ToMap(envVars)
	isEqual(t, map[string]string{
		":":    "/test/unix",
		"PATH": ":/test_val1:/test_val2",
		"VAR":  "REGULARVAR",
		"FOO":  "",
	}, result)
}