CINXE.COM
#1 (Allow wp-test multiple classes and exclusion of) – WordPress Unit Tests
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><script type="text/javascript" src="/_static/js/bundle-playback.js?v=HxkREWBo" charset="utf-8"></script> <script type="text/javascript" src="/_static/js/wombat.js?v=txqj7nKC" charset="utf-8"></script> <script>window.RufflePlayer=window.RufflePlayer||{};window.RufflePlayer.config={"autoplay":"on","unmuteOverlay":"hidden"};</script> <script type="text/javascript" src="/_static/js/ruffle/ruffle.js"></script> <script type="text/javascript"> __wm.init("https://web.archive.org/web"); __wm.wombat("http://unit-tests.trac.wordpress.org/ticket/1","20130112225600","https://web.archive.org/","web","/_static/", "1358031360"); </script> <link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=S1zqJCYt" /> <link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=3PDvdIFv" /> <!-- End Wayback Rewrite JS Include --> <title> #1 (Allow wp-test multiple classes and exclusion of) – WordPress Unit Tests </title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <!--[if IE]><script type="text/javascript"> if (/^#__msie303:/.test(window.location.hash)) window.location.replace(window.location.hash.replace(/^#__msie303:/, '#')); </script><![endif]--> <link rel="search" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/search"/> <link rel="last" href="/ticket/143" title="Ticket #143"/> <link rel="help" href="/wiki/TracGuide"/> <link rel="alternate" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=csv" type="text/csv" class="csv" title="Comma-delimited Text"/><link rel="alternate" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=tab" type="text/tab-separated-values" class="tab" title="Tab-delimited Text"/><link rel="alternate" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=rss" type="application/rss+xml" class="rss" title="RSS Feed"/> <link rel="next" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/2" title="Ticket #2"/> <link rel="start" href="/wiki"/> <link rel="stylesheet" href="/web/20130112225600cs_/http://unit-tests.trac.wordpress.org/chrome/common/css/trac.css" type="text/css"/><link rel="stylesheet" href="/web/20130112225600cs_/http://unit-tests.trac.wordpress.org/chrome/common/css/ticket.css" type="text/css"/> <link rel="shortcut icon" href="/web/20130112225600im_/http://unit-tests.trac.wordpress.org/chrome/common/trac.ico" type="image/x-icon"/> <link rel="icon" href="/web/20130112225600im_/http://unit-tests.trac.wordpress.org/chrome/common/trac.ico" type="image/x-icon"/> <link type="application/opensearchdescription+xml" rel="search" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/search/opensearch" title="Search WordPress Unit Tests"/> <script type="text/javascript"> var auto_preview_timeout=2.0; var form_token="0ac3330152582d8a184a3613"; </script> <script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/jquery.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/babel.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/trac.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/search.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/folding.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/wikitoolbar.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/resizer.js"></script><script type="text/javascript" src="/web/20130112225600js_/http://unit-tests.trac.wordpress.org/chrome/common/js/auto_preview.js"></script> <!--[if lt IE 7]> <script type="text/javascript" src="/chrome/common/js/ie_pre7_hacks.js"></script> <![endif]--> <script type="text/javascript"> jQuery(document).ready(function($) { $("div.description").find("h1,h2,h3,h4,h5,h6").addAnchor(_("Link to this section")); $(".foldable").enableFolding(false, true); var args = {realm: "ticket", id: 1, escape_newlines: 1} $("#comment").autoPreview("/wiki_render", args, function(textarea, text, rendered) { $("#ticketchange div.comment").html(rendered); if (rendered) $("#ticketchange").show(); else if ($("#ticketchange ul.changes").length == 0) $("#ticketchange").hide(); }); $("#trac-comment-editor textarea").autoPreview("/wiki_render", args, function(textarea, text, rendered) { var comment = $("#trac-comment-editor").next("div.comment"); comment.html(rendered); if (rendered) comment.show(); else comment.hide(); }); $("#modify").parent().toggleClass("collapsed"); $(".trac-topnav a").click(function() { $("#modify").parent().removeClass("collapsed"); }); /* only enable control elements for the currently selected action */ var actions = $("#action input[name='action']"); function updateActionFields() { actions.each(function () { $(this).siblings().find("*[id]").enable($(this).checked()); $(this).siblings().filter("*[id]").enable($(this).checked()); }); } actions.click(updateActionFields); updateActionFields(); }); </script> <meta name="viewport" content="width=device-width"/> <link rel="stylesheet" type="text/css" href="//web.archive.org/web/20130112225600cs_/http://wordpress.org/style/trac/wp-trac.css"/> <script src="//web.archive.org/web/20130112225600js_/http://openatd.svn.wordpress.org/atd-jquery/scripts/jquery.atd.textarea.js"></script> <script src="//web.archive.org/web/20130112225600js_/http://openatd.svn.wordpress.org/atd-jquery/scripts/csshttprequest.js"></script> <link rel="stylesheet" type="text/css" href="//web.archive.org/web/20130112225600cs_/http://openatd.svn.wordpress.org/atd-jquery/css/atd.css" media="screen"/> </head> <body class="unit-tests"> <div id="siteheader"> </div> <div id="banner"> <div id="header"> <a id="logo" href="https://web.archive.org/web/20130112225600/http://wordpress.org/"><img src="/web/20130112225600im_/http://unit-tests.trac.wordpress.org/chrome/site/trac-logo.png" alt="WordPress.org" height="80" width="345"/></a> </div> <form id="search" action="/web/20130112225600/http://unit-tests.trac.wordpress.org/search" method="get"> <div> <label for="proj-search">Search:</label> <input type="text" id="proj-search" name="q" size="18" value=""/> <input type="submit" value="Search"/> </div> </form> <div id="metanav" class="nav"> <ul> <li class="first"><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/login">Login</a></li><li><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/prefs">Preferences</a></li><li><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/wiki/TracGuide">Help/Guide</a></li><li class="last"><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/about">About Trac</a></li> </ul> </div> </div> <div id="mainnav" class="nav"> <ul> <li class="first"><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/wiki">Wiki</a></li><li><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline">Timeline</a></li><li><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/roadmap">Roadmap</a></li><li><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/browser">Browse Source</a></li><li class="active"><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/report">View Tickets</a></li><li class="last"><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/search">Search</a></li> </ul> </div> <div id="main"> <div id="ctxtnav" class="nav"> <h2>Context Navigation</h2> <ul> <li class="first"><span class="missing">← Previous Ticket</span></li><li class="last"><span><a class="next" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/2" title="Ticket #2">Next Ticket</a> →</span></li> </ul> <hr/> </div> <div id="content" class="ticket"> <h1 id="trac-ticket-title"> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1">Ticket #1</a> <span class="status">(closed enhancement: wontfix)</span> </h1> <div id="ticket"> <div class="date"> <p>Opened <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2010-05-29T17%3A17%3A41Z&precision=second" title="2010-05-29T17:17:41Z in Timeline">3 years</a> ago</p> <p>Last modified <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2012-07-03T17%3A59%3A07Z&precision=second" title="2012-07-03T17:59:07Z in Timeline">6 months</a> ago</p> </div> <h2 class="summary searchable">Allow wp-test multiple classes and exclusion of</h2> <table class="properties"> <tr> <th id="h_reporter">Reported by:</th> <td headers="h_reporter" class="searchable"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/hakre"> <img class="avatar" src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=hakre" height="24" width="24"/> </a> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/query?status=!closed&reporter=hakre">hakre</a> </td> <th id="h_owner">Owned by:</th> <td headers="h_owner"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/westi"> <img class="avatar" src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=westi" height="24" width="24"/> </a> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/query?status=!closed&owner=westi">westi</a> </td> </tr> <tr> <th id="h_priority"> Priority: </th> <td headers="h_priority"> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/query?status=!closed&priority=normal">normal</a> </td> <th id="h_milestone"> Milestone: </th> <td headers="h_milestone"> <a class="closed milestone" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/milestone/Legacy%20-%20Improve%20Framework">Legacy - Improve Framework</a> </td> </tr><tr> <th id="h_component"> Component: </th> <td headers="h_component"> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/query?status=!closed&component=Test+Framework">Test Framework</a> </td> <th id="h_keywords"> Keywords: </th> <td headers="h_keywords" class="searchable"> </td> </tr><tr> <th id="h_cc"> Cc: </th> <td headers="h_cc" class="searchable"> </td> <th> </th> <td> </td> </tr> </table> <div class="description"> <h3 id="comment:description"> Description </h3> <div class="searchable"> <p> Improvement to the -t commandline switch.<br/> </p> <p> Examples:<br/> </p> <p> Run all tests but <a class="missing wiki">TestLargeThemeDir?</a>, TestImportWP, TestWPQueryPosts, WPTestGalleryPost<br/> </p> <pre class="wiki">$ wp-test -t "! TestLargeThemeDir, TestImportWP, TestWPQueryPosts, WPTestGalleryPost" </pre><p> Only run Test_Clean_Pre and Test_Seems_UTF8<br/> </p> <pre class="wiki">$ wp-test -t Test_Clean_Pre,Test_Seems_UTF8 </pre><p> Additionally a .cmd file helps to start right away on windows.<br/> </p> <p> Related: <a class="ext-link" href="https://web.archive.org/web/20130112225600/http://core.trac.wordpress.org/ticket/12277"><span class="icon"></span>http://core.trac.wordpress.org/ticket/12277</a>, <a class="ext-link" href="https://web.archive.org/web/20130112225600/http://core.trac.wordpress.org/ticket/11867"><span class="icon"></span>http://core.trac.wordpress.org/ticket/11867</a><br/> </p> <p> <em>Originally <a class="ext-link" href="https://web.archive.org/web/20130112225600/http://core.trac.wordpress.org/ticket/13407"><span class="icon"></span>http://core.trac.wordpress.org/ticket/13407</a></em><br/> </p> </div> </div> </div> <div id="attachments"> <h2 class="foldable">Attachments</h2> <div> <dl class="attachments"> <dt> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/attachment/ticket/1/from-hakre.patch" title="View attachment">from-hakre.patch</a><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/raw-attachment/ticket/1/from-hakre.patch" class="trac-rawlink" title="Download"></a> (<span title="1513 bytes">1.5 KB</span>) - added by <em>nacin</em> <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2010-05-29T17%3A20%3A26Z&precision=second" title="2010-05-29T17:20:26Z in Timeline">3 years</a> ago. </dt> </dl> </div> </div> <div> <h2 class="foldable">Change History</h2> <div id="changelog"> <div class="change"> <div class="change"> <h3 class="change"> <span class="avatar"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/nacin"> <img src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=nacin" height="24" width="24"/> nacin</a> — <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2010-05-29T17%3A20%3A26Z&precision=second" title="2010-05-29T17:20:26Z in Timeline">3 years</a> ago </span> </h3> </div> <ul class="changes"> <li> <strong>Attachment</strong> <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/attachment/ticket/1/from-hakre.patch"><em>from-hakre.patch</em></a><a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/raw-attachment/ticket/1/from-hakre.patch" title="Download" class="trac-rawlink"></a> added </li> </ul> <div class="comment searchable"> </div> </div> <div class="change" id="trac-change-1"> <div class="change"> <h3 class="change" id="comment:1"> <span class="threading"> <span id="comment:1" class="cnum"> <a href="#comment:1">comment:1</a> </span> </span> <span class="avatar"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/westi"> <img src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=westi" height="24" width="24"/> westi</a> — <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2010-05-30T08%3A44%3A51Z&precision=second" title="2010-05-30T08:44:51Z in Timeline">3 years</a> ago </span> </h3> </div> <ul class="changes"> <li> <strong>Milestone</strong> set to <em>Improve Test Framework</em> </li> </ul> <div class="comment searchable"> </div> </div> <div class="change" id="trac-change-2"> <div class="change"> <h3 class="change" id="comment:2"> <span class="threading"> <span id="comment:2" class="cnum"> <a href="#comment:2">comment:2</a> </span> </span> <span class="avatar"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/westi"> <img src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=westi" height="24" width="24"/> westi</a> — <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2010-05-30T08%3A45%3A47Z&precision=second" title="2010-05-30T08:45:47Z in Timeline">3 years</a> ago </span> </h3> </div> <ul class="changes"> <li> <strong>Owner</strong> changed from <em>somebody</em> to <em>westi</em> </li><li> <strong>Status</strong> changed from <em>new</em> to <em>accepted</em> </li> </ul> <div class="comment searchable"> </div> </div> <div class="change" id="trac-change-3"> <div class="change"> <h3 class="change" id="comment:3"> <span class="threading"> <span id="comment:3" class="cnum"> <a href="#comment:3">comment:3</a> </span> </span> <span class="avatar"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/dd32"> <img src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=dd32" height="24" width="24"/> dd32</a> — <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2011-03-27T00%3A58%3A37Z&precision=second" title="2011-03-27T00:58:37Z in Timeline">22 months</a> ago </span> </h3> </div> <div class="comment searchable"> <p> See <a class="changeset" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/changeset/339" title="Add support for multiple -t command line options Display more info about ...">[339]</a>, <a class="changeset" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/changeset/340" title="Sometimes you DO want to run all tests\!">[340]</a>, <a class="changeset" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/changeset/341" title="More flexible support for multi-test runs. -t Testcase1 -t Testcase2 || -t ...">[341]</a> for running multiple tests via -t<br/> </p> <p> It accepts any of the following:<br/> </p> <pre class="wiki">-t Test1 -t Test2 -t Test3 -t Test1,Test2,Test3 -t "Test1, Test2, Test3" -t "Test1 Test2 Test3" </pre><p> (Note, The latter 3 can't be combined with the first style)<br/> </p> <p> None of those offer the ability to skip a test, or to include a wildcard of tests.<br/> </p> </div> </div> <div class="change" id="trac-change-4"> <div class="change"> <h3 class="change" id="comment:4"> <span class="threading"> <span id="comment:4" class="cnum"> <a href="#comment:4">comment:4</a> </span> </span> <span class="avatar"> <a href="https://web.archive.org/web/20130112225600/http://profiles.wordpress.org/nacin"> <img src="//web.archive.org/web/20130112225600im_/http://wordpress.org/grav-redirect.php?user=nacin" height="24" width="24"/> nacin</a> — <a class="timeline" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/timeline?from=2012-07-03T17%3A59%3A07Z&precision=second" title="2012-07-03T17:59:07Z in Timeline">6 months</a> ago </span> </h3> </div> <ul class="changes"> <li> <strong>Status</strong> changed from <em>accepted</em> to <em>closed</em> </li><li> <strong>Resolution</strong> set to <em>wontfix</em> </li> </ul> <div class="comment searchable"> <p> New runner renders this moot. It's --group and --exclude-group, now.<br/> </p> </div> </div> </div> </div> <div id="help"><strong>Note:</strong> See <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/wiki/TracTickets">TracTickets</a> for help on using tickets.</div> </div> <div id="altlinks"> <h3>Download in other formats:</h3> <ul> <li class="first"> <a rel="nofollow" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=csv" class="csv">Comma-delimited Text</a> </li><li> <a rel="nofollow" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=tab" class="tab">Tab-delimited Text</a> </li><li class="last"> <a rel="nofollow" href="/web/20130112225600/http://unit-tests.trac.wordpress.org/ticket/1?format=rss" class="rss">RSS Feed</a> </li> </ul> </div> </div> <div id="footer" lang="en" xml:lang="en"><hr/> <a id="tracpowered" href="https://web.archive.org/web/20130112225600/http://trac.edgewall.org/"><img src="/web/20130112225600im_/http://unit-tests.trac.wordpress.org/chrome/common/trac_logo_mini.png" height="30" width="107" alt="Trac Powered"/></a> <p class="left">Powered by <a href="/web/20130112225600/http://unit-tests.trac.wordpress.org/about"><strong>Trac 0.12.4</strong></a><br/> By <a href="https://web.archive.org/web/20130112225600/http://www.edgewall.org/">Edgewall Software</a>.</p> <p class="right">A <a href="https://web.archive.org/web/20130112225600/http://wordpress.org/">WordPress</a> Project</p> </div> <div id="sitefooter"> </div> <script src="//web.archive.org/web/20130112225600js_/http://wordpress.org/js/trac/wp-trac.js"></script> </body> </html><!-- FILE ARCHIVED ON 22:56:00 Jan 12, 2013 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 20:22:13 Nov 28, 2024. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). --> <!-- playback timings (ms): captures_list: 1.277 exclusion.robots: 0.057 exclusion.robots.policy: 0.035 esindex: 0.019 cdx.remote: 136.318 LoadShardBlock: 101.0 (3) PetaboxLoader3.datanode: 76.759 (4) PetaboxLoader3.resolve: 119.202 (2) load_resource: 97.7 -->