Index: /trunk/base/src/macports1.0/macports.tcl
===================================================================
--- /trunk/base/src/macports1.0/macports.tcl	(revision 140487)
+++ /trunk/base/src/macports1.0/macports.tcl	(revision 140488)
@@ -3438,5 +3438,5 @@
         configure   -
         build       {return "depends_fetch depends_extract depends_build depends_lib"}
-        test        -
+        test        {return "depends_fetch depends_extract depends_build depends_lib depends_run depends_test"}
         destroot    {return "depends_fetch depends_extract depends_build depends_lib depends_run"}
         dmg         -
Index: /trunk/base/src/port/port.tcl
===================================================================
--- /trunk/base/src/port/port.tcl	(revision 140487)
+++ /trunk/base/src/port/port.tcl	(revision 140488)
@@ -102,4 +102,5 @@
 Pseudo-portnames starting with variants:, variant:, description:, depends:,
 depends_lib:, depends_run:, depends_build:, depends_fetch:, depends_extract:,
+depends_test:,
 portdir:, homepage:, epoch:, platforms:, platform:, name:, long_description:,
 maintainers:, maintainer:, categories:, category:, version:, revision:, and
@@ -1074,5 +1075,5 @@
     # gather its deps
     set results {}
-    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
+    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
 
     set deplist {}
@@ -1368,4 +1369,5 @@
         ^depends_extract:   -
         ^depends_fetch:     -
+        ^depends_test:      -
         ^replaced_by:       -
         ^revision:          -
@@ -1396,4 +1398,5 @@
             add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_extract"]
             add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_fetch"]
+            add_multiple_ports reslist [get_matching_ports $pat no regexp "depends_test"]
 
             set el 1
@@ -2056,4 +2059,5 @@
             depends_lib     1
             depends_run     1
+            depends_test    1
             maintainers     1
             platforms       1
@@ -2073,4 +2077,5 @@
             depends_run "Runtime Dependencies"
             depends_lib "Library Dependencies"
+            depends_test "Test Dependencies"
             description "Brief Description"
             long_description "Description"
@@ -2096,4 +2101,5 @@
             depends_run 22
             depends_lib 22
+            depends_test 22
             description 22
             long_description 22
@@ -2115,4 +2121,5 @@
             set options(ports_info_depends_lib) yes
             set options(ports_info_depends_run) yes
+            set options(ports_info_depends_test) yes
         }
                 
@@ -2165,4 +2172,5 @@
                 ports_info_depends_extract ports_info_depends_build
                 ports_info_depends_lib ports_info_depends_run
+                ports_info_depends_test
                 ports_info_conflicts
                 ports_info_platforms ports_info_license
@@ -2939,5 +2947,5 @@
             set deptypes {depends_lib depends_run}
         } else {
-            set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
+            set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
         }
 
@@ -3014,5 +3022,5 @@
         set deps_output {}
         set ndeps 0
-        array set labeldict {depends_fetch Fetch depends_extract Extract depends_build Build depends_lib Library depends_run Runtime}
+        array set labeldict {depends_fetch Fetch depends_extract Extract depends_build Build depends_lib Library depends_run Runtime depends_test Test}
         # get list of direct deps
         foreach type $deptypes {
@@ -3652,4 +3660,5 @@
         set options(ports_search_depends_lib) yes
         set options(ports_search_depends_run) yes
+        set options(ports_search_depends_test) yes
     }
 
@@ -4375,5 +4384,5 @@
     edit        {{editor 1}}
     info        {category categories conflicts depends_fetch depends_extract
-                 depends_build depends_lib depends_run
+                 depends_build depends_lib depends_run depends_test
                  depends description epoch fullname heading homepage index license
                  line long_description
@@ -4385,5 +4394,5 @@
     rdependents {full}
     search      {case-sensitive category categories depends_fetch
-                 depends_extract depends_build depends_lib depends_run
+                 depends_extract depends_build depends_lib depends_run depends_test
                  depends description epoch exact glob homepage line
                  long_description maintainer maintainers name platform
Index: /trunk/base/src/port/portindex.tcl
===================================================================
--- /trunk/base/src/port/portindex.tcl	(revision 140487)
+++ /trunk/base/src/port/portindex.tcl	(revision 140488)
@@ -272,5 +272,5 @@
 set save_prefix ${macports::prefix}
 foreach key {categories depends_fetch depends_extract depends_build \
-             depends_lib depends_run description epoch homepage \
+             depends_lib depends_run depends_test description epoch homepage \
              long_description maintainers name platforms revision variants \
              version portdir replaced_by license installs_libs conflicts} {
Index: /trunk/base/src/port1.0/portdepends.tcl
===================================================================
--- /trunk/base/src/port1.0/portdepends.tcl	(revision 140487)
+++ /trunk/base/src/port1.0/portdepends.tcl	(revision 140488)
@@ -39,7 +39,7 @@
 
 # define options
-options depends_fetch depends_extract depends_build depends_run depends_lib depends
+options depends_fetch depends_extract depends_build depends_run depends_lib depends_test depends
 # Export options via PortInfo
-options_export depends_fetch depends_extract depends_build depends_lib depends_run
+options_export depends_fetch depends_extract depends_build depends_lib depends_run depends_test
 
 option_proc depends_fetch portdepends::validate_depends_options
@@ -48,4 +48,5 @@
 option_proc depends_run portdepends::validate_depends_options
 option_proc depends_lib portdepends::validate_depends_options
+option_proc depends_test portdepends::validate_depends_options
 
 # New option for the new dependency. We generate a warning because we don't handle this yet.
Index: /trunk/base/src/port1.0/portlint.tcl
===================================================================
--- /trunk/base/src/port1.0/portlint.tcl	(revision 140487)
+++ /trunk/base/src/port1.0/portlint.tcl	(revision 140488)
@@ -340,6 +340,6 @@
            description long_description platforms categories all_variants \
            maintainers license homepage master_sites checksums patchfiles \
-           depends_fetch depends_extract depends_lib depends_build \
-           depends_run distfiles fetch.type lint_portsystem lint_platforms \
+           depends_fetch depends_extract depends_lib depends_build depends_run \
+           depends_test distfiles fetch.type lint_portsystem lint_platforms \
            lint_required lint_optional replaced_by conflicts
     set portarch [get_canonical_archs]
@@ -508,4 +508,7 @@
         lappend all_depends {*}$depends_run
     }
+    if {[info exists depends_test]} {
+        lappend all_depends {*}$depends_test
+    }
     foreach depspec $all_depends {
         set dep [lindex [split $depspec :] end]
@@ -524,5 +527,5 @@
 
     # Check for multiple dependencies
-    foreach deptype {depends_extract depends_lib depends_build depends_run} {
+    foreach deptype {depends_extract depends_lib depends_build depends_run depends_test} {
         if {[info exists $deptype]} {
             array set depwarned {}
Index: /trunk/base/src/port1.0/portutil.tcl
===================================================================
--- /trunk/base/src/port1.0/portutil.tcl	(revision 140487)
+++ /trunk/base/src/port1.0/portutil.tcl	(revision 140488)
@@ -1445,6 +1445,5 @@
                         configure   -
                         build       { set deptypes "depends_fetch depends_extract depends_lib depends_build" }
-
-                        test        -
+                        test        { set deptypes "depends_fetch depends_extract depends_lib depends_build depends_run depends_test" }
                         destroot    -
                         dmg         -
Index: /trunk/base/src/registry2.0/portuninstall.tcl
===================================================================
--- /trunk/base/src/registry2.0/portuninstall.tcl	(revision 140487)
+++ /trunk/base/src/registry2.0/portuninstall.tcl	(revision 140488)
@@ -45,5 +45,5 @@
 proc generate_deplist {port {optslist ""}} {
 
-    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run}
+    set deptypes {depends_fetch depends_extract depends_build depends_lib depends_run depends_test}
     set all_dependencies {}
     # look up deps from the saved portfile if possible
