[108530] branches/gsoc13-tests/src/port1.0/tests/portdepends.test
marius at macports.org
marius at macports.org
Thu Jul 25 14:14:40 PDT 2013
Revision: 108530
https://trac.macports.org/changeset/108530
Author: marius at macports.org
Date: 2013-07-25 14:14:40 -0700 (Thu, 25 Jul 2013)
Log Message:
-----------
portdepends.test: added test file
Added Paths:
-----------
branches/gsoc13-tests/src/port1.0/tests/portdepends.test
Added: branches/gsoc13-tests/src/port1.0/tests/portdepends.test
===================================================================
--- branches/gsoc13-tests/src/port1.0/tests/portdepends.test (rev 0)
+++ branches/gsoc13-tests/src/port1.0/tests/portdepends.test 2013-07-25 21:14:40 UTC (rev 108530)
@@ -0,0 +1,32 @@
+package require tcltest 2
+namespace import tcltest::*
+
+set pwd [file normalize $argv0]
+set pwd [eval file join {*}[lrange [file split $pwd] 0 end-1]]
+
+package require macports 1.0
+mportinit
+
+source ../portdepends.tcl
+
+
+test validate_depends_options {
+ Validate depends unit test.
+} -body {
+ set res [catch {portdepends::validate_depends_options target set {lib:test.val:value}}]
+ if {$res != 0} {return "FAIL: value lib:test.val:value not accepted"}
+ set res [catch {portdepends::validate_depends_options target set {bin:test.val:value}}]
+ if {$res != 0} {return "FAIL: value bin:test.val:value not accepted"}
+ set res [catch {portdepends::validate_depends_options target set {path:test:value}}]
+ if {$res != 0} {return "FAIL: value path:test:value not accepted"}
+ set res [catch {portdepends::validate_depends_options target set {port:test3}}]
+ if {$res != 0} {return "FAIL: value port:test3 not accepted"}
+ set res [catch {portdepends::validate_depends_options target set {lib:test}}]
+ if {$res != 1} {return "FAIL: invalid options lib:test accepted"}
+ return "Validate depends successful."
+} -result "Validate depends successful."
+
+# test validate_depends_options_new
+
+
+cleanupTests
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130725/c07c02fb/attachment.html>
More information about the macports-changes
mailing list