File: framer_test.go

package info (click to toggle)
golang-github-racksec-srslog 0.0~git20160120.0.259aed1-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 152 kB
  • ctags: 165
  • sloc: python: 49; sh: 33; makefile: 13
file content (19 lines) | stat: -rw-r--r-- 392 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package srslog

import (
	"testing"
)

func TestDefaultFramer(t *testing.T) {
	out := DefaultFramer("input message")
	if out != "input message" {
		t.Errorf("should match the input message")
	}
}

func TestRFC5425MessageLengthFramer(t *testing.T) {
	out := RFC5425MessageLengthFramer("input message")
	if out != "13 input message" {
		t.Errorf("should prepend the input message length")
	}
}