github.com/gogf/gf@v1.16.9/text/gstr/gstr_z_unit_convert_test.go (about)

     1  // Copyright GoFrame Author(https://goframe.org). All Rights Reserved.
     2  //
     3  // This Source Code Form is subject to the terms of the MIT License.
     4  // If a copy of the MIT was not distributed with this file,
     5  // You can obtain one at https://github.com/gogf/gf.
     6  
     7  // go test *.go -bench=".*"
     8  
     9  package gstr_test
    10  
    11  import (
    12  	"testing"
    13  
    14  	"github.com/gogf/gf/test/gtest"
    15  	"github.com/gogf/gf/text/gstr"
    16  )
    17  
    18  func Test_OctStr(t *testing.T) {
    19  	gtest.C(t, func(t *gtest.T) {
    20  		t.Assert(gstr.OctStr(`\346\200\241`), "怡")
    21  	})
    22  }