github.com/blend/go-sdk@v1.20240719.1/ansi/color256_test.go (about)

     1  /*
     2  
     3  Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package ansi_test
     9  
    10  import (
    11  	"testing"
    12  
    13  	"github.com/blend/go-sdk/ansi"
    14  	"github.com/blend/go-sdk/assert"
    15  )
    16  
    17  func TestColor256_Apply(t *testing.T) {
    18  	t.Parallel()
    19  	it := assert.New(t)
    20  
    21  	actual := ansi.Color256Gold3Alt2.Apply("[CONFIG] Timeout:")
    22  	expected := "\033[38;5;178m[CONFIG] Timeout:\033[0m"
    23  	it.Equal(expected, actual)
    24  }