@@ -60,10 +60,10 @@ func extractRawString(t *testing.T, cmd tea.Cmd) string {
63−func TestOSC99Backend_Send(t *testing.T) {
63+func TestOSCBackend_Send_OSC99(t *testing.T) {
64 t.Parallel()
64 t.Parallel()
66− backend := notification.NewOSC99Backend(nil)
66+ backend := notification.NewOSCBackend(nil, true)
67 s := extractRawString(t, backend.Send(notification.Notification{
67 s := extractRawString(t, backend.Send(notification.Notification{
68 Title: "Crush is waiting...",
68 Title: "Crush is waiting...",
69 Message: "Agent's turn completed",
69 Message: "Agent's turn completed",
@@ -78,10 +78,10 @@ func TestOSC99Backend_Send(t *testing.T) {
78 require.NotContains(t, s, "\x1b]9;")
78 require.NotContains(t, s, "\x1b]9;")
81−func TestOSC99Backend_Send_TitleOnly(t *testing.T) {
81+func TestOSCBackend_Send_OSC99_TitleOnly(t *testing.T) {
82 t.Parallel()
82 t.Parallel()
84− backend := notification.NewOSC99Backend(nil)
84+ backend := notification.NewOSCBackend(nil, true)
85 s := extractRawString(t, backend.Send(notification.Notification{
85 s := extractRawString(t, backend.Send(notification.Notification{
86 Title: "Crush is waiting...",
86 Title: "Crush is waiting...",
@@ -92,11 +92,11 @@ func TestOSC99Backend_Send_TitleOnly(t *testing.T) {
92 require.NotContains(t, s, "\x1b]9;")
92 require.NotContains(t, s, "\x1b]9;")
95−func TestOSC99Backend_Send_WithIcon(t *testing.T) {
95+func TestOSCBackend_Send_OSC99_WithIcon(t *testing.T) {
96 t.Parallel()
96 t.Parallel()
98 iconData := []byte("fake-png-data")
98 iconData := []byte("fake-png-data")
99− backend := notification.NewOSC99Backend(iconData)
99+ backend := notification.NewOSCBackend(iconData, true)
100 s := extractRawString(t, backend.Send(notification.Notification{
100 s := extractRawString(t, backend.Send(notification.Notification{
101 Title: "Test",
101 Title: "Test",
102 Message: "With icon",
102 Message: "With icon",
@@ -111,10 +111,10 @@ func TestOSC99Backend_Send_WithIcon(t *testing.T) {
111 require.NotContains(t, s, "\x1b]9;")
111 require.NotContains(t, s, "\x1b]9;")
114−func TestOSC777Backend_Send(t *testing.T) {
114+func TestOSCBackend_Send_OSC777(t *testing.T) {
115 t.Parallel()
115 t.Parallel()
117− backend := notification.NewOSC777Backend()
117+ backend := notification.NewOSCBackend(nil, false)
118 s := extractRawString(t, backend.Send(notification.Notification{
118 s := extractRawString(t, backend.Send(notification.Notification{
119 Title: "Test",
119 Title: "Test",
120 Message: "With body",
120 Message: "With body",
@@ -196,3 +196,18 @@ func TestOSC99QuerySequence(t *testing.T) {
196 require.Contains(t, seq, "p=?")
196 require.Contains(t, seq, "p=?")
197 require.Contains(t, seq, "\x07")
197 require.Contains(t, seq, "\x07")
200+func TestBellBackend_Send(t *testing.T) {
203+ backend := notification.NewBellBackend()
204+ s := extractRawString(t, backend.Send(notification.Notification{
206+ Message: "Ignored by bell",
209+ // Bell backend only sends the bell character.
210+ require.Equal(t, "\x07", s)
211+ require.NotContains(t, s, "Test")
212+ require.NotContains(t, s, "Ignored")