...

Source file src/github.com/thlib/go-timezone-local/tzlocal/tz_unix_test.go

Documentation: github.com/thlib/go-timezone-local/tzlocal

     1  //go:build !windows
     2  // +build !windows
     3  
     4  package tzlocal
     5  
     6  import "testing"
     7  
     8  func TestInferFromPathSuccess(t *testing.T) {
     9  	tz, err := inferFromPath("/usr/share/zoneinfo/Asia/Tokyo")
    10  	if err != nil {
    11  		t.Errorf("got err=%d; want: nil", err)
    12  	}
    13  	want := "Asia/Tokyo"
    14  	if tz != want {
    15  		t.Errorf("got tz=%s; want: %s", tz, want)
    16  	}
    17  }
    18  

View as plain text