Index: tests/shortcode.php
===================================================================
--- tests/shortcode.php	(revision 929)
+++ tests/shortcode.php	(working copy)
@@ -13,6 +13,10 @@
 		foreach ( $this->shortcodes as $shortcode )
 			add_shortcode( $shortcode, array( $this, '_shortcode_' . $shortcode ) );
 
+		add_shortcode( 'hyphen', array( $this, '_shortcode_hyphen' ) );
+		add_shortcode( 'hyphen-foo', array( $this, '_shortcode_hyphen_foo' ) );
+		add_shortcode( 'hyphen-foo-bar', array( $this, '_shortcode_hyphen_foo_bar' ) );
+
 		$this->atts = null;
 		$this->content = null;
 		$this->tagname = null;
@@ -60,6 +64,18 @@
 		$this->tagname = $tagname;
 	}
 
+	function _shortcode_hyphen() {
+		return __FUNCTION__;
+	}
+
+	function _shortcode_hyphen_foo() {
+		return __FUNCTION__;
+	}
+
+	function _shortcode_hyphen_foo_bar() {
+		return __FUNCTION__;
+	}
+
 	function test_noatts() {
 		do_shortcode('[test-shortcode-tag /]');
 		$this->assertEquals( '', $this->atts );
@@ -77,6 +93,32 @@
 		$this->assertEquals( '[not-a-shortcode-tag]', $out );
 	}
 
+	function test_tag_hyphen_not_tag() {
+		$out = do_shortcode( '[dumptag-notreal]' );
+		$this->assertEquals( '[dumptag-notreal]', $out );
+	}
+
+	function test_tag_underscore_not_tag() {
+		$out = do_shortcode( '[dumptag_notreal]' );
+		$this->assertEquals( '[dumptag_notreal]', $out );
+	}
+
+	function test_tag_not_tag() {
+		$out = do_shortcode( '[dumptagnotreal]' );
+		$this->assertEquals( '[dumptagnotreal]', $out );
+	}
+
+	/**
+	 * @see #17657
+	 */
+	function test_tag_hyphen() {
+ 		$this->assertEquals( '_shortcode_hyphen', do_shortcode( '[hyphen]' ) );
+ 		$this->assertEquals( '_shortcode_hyphen_foo', do_shortcode( '[hyphen-foo]' ) );
+ 		$this->assertEquals( '_shortcode_hyphen_foo_bar', do_shortcode( '[hyphen-foo-bar]' ) );
+		$this->assertEquals( '[hyphen-baz]', do_shortcode( '[hyphen-baz]' ) );
+		$this->assertEquals( '[hyphen-foo-bar-baz]', do_shortcode( '[hyphen-foo-bar-baz]' ) );
+	}
+
 	function test_two_atts() {
 		do_shortcode('[test-shortcode-tag foo="asdf" bar="bing" /]');
 		$this->assertEquals( array('foo' => 'asdf', 'bar' => 'bing'), $this->atts );
