File: disable_test.go

package info (click to toggle)
tml 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 168 kB
  • sloc: makefile: 16
file content (16 lines) | stat: -rw-r--r-- 403 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package tml

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestParseWithFormattingDisabled(t *testing.T) {
	DisableFormatting()
	defer EnableFormatting()
	output, err := Parse("plain <red>red <bold>bold red</bold></red> plain <green>green</green> plain")
	require.Nil(t, err)
	assert.Equal(t, "plain red bold red plain green plain", output)
}