MCPcopy Index your code
hub / github.com/coder/coder / TestWorkspaceAgentLogTextSpecialChars

Function TestWorkspaceAgentLogTextSpecialChars

codersdk/workspaceagents_test.go:100–112  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

98}
99
100func TestWorkspaceAgentLogTextSpecialChars(t *testing.T) {
101 t.Parallel()
102
103 ts := time.Date(2024, 1, 28, 10, 30, 0, 0, time.UTC)
104 log := codersdk.WorkspaceAgentLog{
105 CreatedAt: ts,
106 Level: codersdk.LogLevelDebug,
107 Output: "\033[31mError!\033[0m 🚀 Unicode: 日本語",
108 SourceID: uuid.New(),
109 }
110 result := log.Text("main", "startup_script")
111 require.Equal(t, "2024-01-28T10:30:00Z [debug] [agent.main|startup_script] \033[31mError!\033[0m 🚀 Unicode: 日本語", result)
112}
113
114func TestWorkspaceAgentDevcontainerEquals(t *testing.T) {
115 t.Parallel()

Callers

nothing calls this directly

Calls 3

TextMethod · 0.95
NewMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected