[wp-trac] [WordPress Trac] #17657: Shortcode regex doesn't allow for hyphens in shortcode name

WordPress Trac wp-trac at lists.automattic.com
Fri Jul 20 12:58:28 UTC 2012


#17657: Shortcode regex doesn't allow for hyphens in shortcode name
-------------------------------------+--------------------
 Reporter:  sivel                    |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  3.5
Component:  Shortcodes               |     Version:  2.9.2
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+--------------------
Changes (by nacin):

 * keywords:  has-patch needs-testing needs-unit-tests => has-patch needs-
     testing


Comment:

 Replying to [comment:13 kovshenin]:
 > [attachment:17657-unit-tests.2.diff] includes @aaroncampbell's tests and
 a test for hyphenated shortcodes. Two failures with current trunk, both
 succeed with [attachment:17657.3.diff].

 [UT930]

 > I noticed that at least three of the shortcode tests are skipped,
 because their function doc contains a reference to a ticket with
 `@ticket`. I don't think that's normal, is it?

 Yeah, that is normal. If the referenced ticket is still open, then it is
 considered to be unit tests for a "known bug" — as in, it would fail — so
 it is skipped instead. You can run these by definining
 WP_TESTS_FORCE_KNOWN_BUGS as true in wp-tests-config.php, or more
 selectively by explicitly running that group. For example:

 `phpunit --group shortcode,6562,14050`

 Also, if you run `phpunit --verbose --group shortcode`, it'll tell you
 that the tests were skipped because tickets are not fixed.

 So to run the tests for this ticket, you'll want:

 `phpunit --group shortcode,17657`

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17657#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list