Index: tests/phpunit/tests/dependencies/styles.php
===================================================================
--- tests/phpunit/tests/dependencies/styles.php	(revision 29957)
+++ tests/phpunit/tests/dependencies/styles.php	(working copy)
@@ -44,6 +44,25 @@
 	}
 
 	/**
+	 * Test assorted handles to make sure we don't break how they output.
+	 */
+	public function test_awkward_handles_are_supported_consistently() {
+		wp_enqueue_style( 'with some spaces',     'example.com', array(), null );
+		wp_enqueue_style( 'with-☃-snowman',       'example.com', array(), null );
+		wp_enqueue_style( 'with-trailing-space ', 'example.com', array(), null );
+		wp_enqueue_style( ' with-leading-space',  'example.com', array(), null );
+		wp_enqueue_style( 'an "ironic" title',    'example.com', array(), null );
+
+		$expected  = "<link rel='stylesheet' id='with some spaces-css'  href='http://example.com' type='text/css' media='all' />\n";
+		$expected .= "<link rel='stylesheet' id='with-☃-snowman-css'  href='http://example.com' type='text/css' media='all' />\n";
+		$expected .= "<link rel='stylesheet' id='with-trailing-space -css'  href='http://example.com' type='text/css' media='all' />\n";
+		$expected .= "<link rel='stylesheet' id=' with-leading-space-css'  href='http://example.com' type='text/css' media='all' />\n";
+		$expected .= "<link rel='stylesheet' id='an \"ironic\" title-css'  href='http://example.com' type='text/css' media='all' />\n";
+
+		$this->assertEquals( $expected, get_echo( 'wp_print_styles' ) );
+	}
+
+	/**
 	 * Test the different protocol references in wp_enqueue_style
 	 * @global WP_Styles $wp_styles
 	 * @ticket 16560
