You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

parser_test.go 460B

1234567891011121314
  1. package chocococon
  2. import (
  3. "github.com/stretchr/testify/require"
  4. "testing"
  5. )
  6. func TestTokenSeperation(t *testing.T) {
  7. assert := require.New(t)
  8. assert.EqualValues([]string{"go"}, makeTokens("go"))
  9. assert.EqualValues([]string{"go", "8"}, makeTokens("go,8"))
  10. assert.EqualValues([]string{"go,", "8"}, makeTokens("go\\,,8"))
  11. assert.EqualValues([]string{"opendev", "/dev/tty0", "bus0", "newline=,\n"}, makeTokens("opendev,/dev/tty0,bus0,newline=\\,\n"))
  12. }