# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 package require tcltest 2 namespace import tcltest::* set pwd [file dirname [file normalize $argv0]] source ../port_test_autoconf.tcl package require macports 1.0 array set ui_options {} #set ui_options(ports_debug) yes #set ui_options(ports_verbose) yes mportinit ui_options source ./library.tcl macports_worker_init package require portmain 1.0 # Set testing vars set os_platform darwin set macos_version 10.8.0 set os_version 12 set os_arch i386 set portpath . set portbuildpath ./build set macports::portdbpath . test get_default_subport { Get default subport unit test. } -body { set portpath path/port/subport set result [portmain::get_default_subport] if {$result ne "subport"} { return "FAIL: wrong subport: $result" } return "Get default subport successful." } -result "Get default subport successful." test get_subbuildpath { Get subbuildpath unit test. } -body { set portpath path/port/subport set result [portmain::get_subbuildpath] if {$result ne [file normalize "./build/subport-a3cbf658"]} { return "FAIL: wrong subbuildpath: $result" } return "Get subbuild path successful." } -result "Get subbuild path successful." cleanupTests