ycl

Artifact [8d6569dc57]
Login

Artifact [8d6569dc57]

Artifact 8d6569dc57b3a5d9d66d294dba765c9d911e6644:


#! /bin/env tclsh

proc suite_main {} {
	package require ycl::package 
	namespace import [yclprefix]::package
	namespace import [yclprefix]::package::vcomp
	::package require ycl::test
	ycl::test::init

	set setup1 {
		set res [list]
	}

	test loaded {} -body {
		set loaded [package loaded]
		set check [list ycl ycl::test ycl::package tcltest]
		foreach name $check {
			lappend res [expr {$name in $check}]
		}
		return $res
	} -result {1 1 1 1}

	test vcomp {a b} -setup $setup1 -body {
		if 0 {
		}
		foreach comparison {
			{1 2}
			{2 1}
			{1a 2}
			{1 2a}
			{1.0 1.1}
			{1.1 1.0}
			{1.02 1.1}
			{alphabet soup}
			{soup alphabet}
			{{1 bB32V8} {1bD32V8}}
			{1.9.3a 1.10.0}


		} {
			lappend res [vcomp {*}$comparison]
		}
		return $res
	} -result {-1 1 -1 -1 -1 1 1 -1 1 -1 -1}


	cleanupTests
}