kcl-lang.io/kpm@v0.8.7-0.20240520061008-9fc4c5efc8c7/pkg/version/version_test.go (about)

     1  // Deprecated: The entire contents of this file will be deprecated.
     2  // Please use the kcl cli - https://github.com/kcl-lang/cli.
     3  package version
     4  
     5  import "testing"
     6  
     7  // Deprecated: This function will be removed in a future version.
     8  func TestGetVersionInStr(t *testing.T) {
     9  	tests := []struct {
    10  		name string
    11  		want string
    12  	}{
    13  		{
    14  			name: "test get version in string",
    15  			want: "0.9.0",
    16  		},
    17  	}
    18  	for _, tt := range tests {
    19  		t.Run(tt.name, func(t *testing.T) {
    20  			if got := GetVersionInStr(); got != tt.want {
    21  				t.Errorf("GetVersionInStr() = %v, want %v", got, tt.want)
    22  			}
    23  		})
    24  	}
    25  }