<commit_before>
import PrettyColors
import Foundation
import XCTest

class PrettyColorsTests: XCTestCase {

	override func setUp() {
		super.setUp()
	}

	override func tearDown() {
		super.tearDown()
	}

	func notTest() {
		Color.Wrap(foreground: .Red).wrap("•••")
		Color.Wrap(foreground: .Yellow, style: .Bold)
		Color.Wrap(foreground: nil as UInt8?)
		// Color.Wrap(style: StyleParameter.Bold)
	}
	
	// Figure out how to do this with XCTest
	func blarg_shouldFail() {
		// println( formerlyRed.add(parameters: Color.EightBit(background: 244)).wrap("•••") )
	}

	func testEmptyWrap() {
		XCTAssert(
			Color.Wrap(foreground: nil as UInt8?).code.enable == "",
			"Wrap with no parameters wrapping an empty string should return an empty SelectGraphicRendition."
		)
		XCTAssert(
			Color.Wrap(foreground: nil as UInt8?).wrap("") == "",
			"Wrap with no parameters wrapping an empty string should return an empty string."
		)
	}
	
	func testMulti() {
		var multi = Color.Wrap(parameters: [
			Color.EightBit(foreground: 227),
			Color.Named(foreground: .Green, brightness: .NonBright)
		])
		XCTAssert(
			multi.code.enable ==
			ECMA48.controlSequenceIntroducer + "38;5;227" + ";" + "32" + "m"
		)
		XCTAssert(
			multi.code.disable ==
			ECMA48.controlSequenceIntroducer + "0" + "m"
		)
	}

	func testWrapComputedVariableForeground() {
		XCTAssert(<commit_msg>Remove junk test.<commit_after>
import PrettyColors
import Foundation
import XCTest

class PrettyColorsTests: XCTestCase {

	override func setUp() {
		super.setUp()
	}

	override func tearDown() {
		super.tearDown()
	}

	func notTest() {
		Color.Wrap(foreground: .Red).wrap("•••")
		Color.Wrap(foreground: .Yellow, style: .Bold)
		Color.Wrap(foreground: nil as UInt8?)
		// Color.Wrap(style: StyleParameter.Bold)
	}
	
	func testEmptyWrap() {
		XCTAssert(
			Color.Wrap(foreground: nil as UInt8?).code.enable == "",
			"Wrap with no parameters wrapping an empty string should return an empty SelectGraphicRendition."
		)
		XCTAssert(
			Color.Wrap(foreground: nil as UInt8?).wrap("") == "",
			"Wrap with no parameters wrapping an empty string should return an empty string."
		)
	}
	
	func testMulti() {
		var multi = Color.Wrap(parameters: [
			Color.EightBit(foreground: 227),
			Color.Named(foreground: .Green, brightness: .NonBright)
		])
		XCTAssert(
			multi.code.enable ==
			ECMA48.controlSequenceIntroducer + "38;5;227" + ";" + "32" + "m"
		)
		XCTAssert(
			multi.code.disable ==
			ECMA48.controlSequenceIntroducer + "0" + "m"
		)
	}

	func testWrapComputedVariableForeground() {
		XCTAssert(
{'fraction_non_alphanumeric': 0.13533541341653665, 'fraction_numerical': 0.015990639625585022, 'mean_word_length': 3.9326923076923075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2462554', 'n_tokens_mistral': 1004, 'n_tokens_neox': 882, 'n_words': 205}