File: qrterminal_test.go

package info (click to toggle)
qrterminal 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 116 kB
  • sloc: makefile: 11
file content (39 lines) | stat: -rw-r--r-- 875 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package qrterminal

import (
	"os"
	"testing"
)

func TestGenerate(t *testing.T) {
	Generate("https://github.com/mdp/qrterminal", L, os.Stdout)
}

func TestGenerateWithConfig(t *testing.T) {
	config := Config{
		Level:     M,
		Writer:    os.Stdout,
		BlackChar: WHITE, // Inverted
		WhiteChar: BLACK,
		QuietZone: QUIET_ZONE,
	}
	GenerateWithConfig("https://github.com/mdp/qrterminal", config)
}

func TestGenerateHalfBlock(t *testing.T) {
	GenerateHalfBlock("https://github.com/mdp/qrterminal", L, os.Stdout)
}

func TestGenerateWithHalfBlockConfig(t *testing.T) {
	config := Config{
		Level:          M,
		Writer:         os.Stdout,
		HalfBlocks:     true,
		BlackChar:      BLACK_BLACK,
		WhiteBlackChar: WHITE_BLACK,
		WhiteChar:      WHITE_WHITE,
		BlackWhiteChar: BLACK_WHITE,
		QuietZone:      3,
	}
	GenerateWithConfig("https://github.com/mdp/qrterminal", config)
}