mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-20 02:36:37 +08:00
24 lines
360 B
Go
24 lines
360 B
Go
|
|
package shared
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
"testing"
|
||
|
|
)
|
||
|
|
|
||
|
|
func TestHeaderList_FormatHeaders(t *testing.T) {
|
||
|
|
list := &HeaderList{}
|
||
|
|
|
||
|
|
for i := 0; i < 5; i++ {
|
||
|
|
list.AddRequestHeader(&HeaderConfig{
|
||
|
|
IsOn: true,
|
||
|
|
Name: "A" + fmt.Sprintf("%d", i),
|
||
|
|
Value: "ABCDEFGHIJ${name}KLM${hello}NEFGHIJILKKKk",
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
err := list.Init()
|
||
|
|
if err != nil {
|
||
|
|
t.Fatal(err)
|
||
|
|
}
|
||
|
|
}
|