Index: tests/shortcode.php
===================================================================
--- tests/shortcode.php	(revision 1106)
+++ tests/shortcode.php	(working copy)
@@ -4,7 +4,7 @@
  */
 class Tests_Shortcode extends WP_UnitTestCase {
 
-	protected $shortcodes = array( 'test-shortcode-tag', 'footag', 'bartag', 'baztag', 'dumptag', 'hyphen', 'hyphen-foo', 'hyphen-foo-bar' );
+	protected $shortcodes = array( 'test-shortcode-tag', 'footag', 'bartag', 'baztag', 'dumptag', 'hyphen', 'hyphen-foo', 'hyphen-foo-bar', 'div' );
 
 	function setUp() {
 		parent::setUp();
@@ -70,6 +70,23 @@
 		return __FUNCTION__;
 	}
 
+	function _shortcode_div( $args, $content = '' ) {
+		if ( empty( $args ) )
+			$args = array();
+
+		$attributes = array();
+
+		foreach ( (array) $args as $key => $value )
+			$attributes[] = $key . '="' . esc_attr( $value ) . '"';
+
+		if ( $attributes )
+			$attributes = ' ' . implode( ' ', $attributes );
+		else
+			$attributes = '';
+
+		return "<div{$attributes}>" . do_shortcode( $content ) . "</div{$attributes}>";
+	}
+
 	function test_noatts() {
 		do_shortcode('[test-shortcode-tag /]');
 		$this->assertEquals( '', $this->atts );
@@ -203,6 +220,20 @@
 	}
 
 	/**
+	 * @ticket 10702
+	 */
+	function test_complex_nested_tags() {
+		$out = do_shortcode( '[div]content[/div]' );
+		$this->assertEquals( '<div>content</div>', $out );
+
+		$out = do_shortcode( '[div arg="one"][div arg="two"][div arg="three"]content[/div][/div][/div]' );
+		$this->assertEquals( '<div arg="one"><div arg="two"><div arg="three">content</div arg="three"></div arg="two"></div arg="one">', $out );
+
+		$out = do_shortcode( '[div arg="one"]one[div arg="two"]two[/div]one[div arg="three"]three[/div]one[/div]' );
+		$this->assertEquals( '<div arg="one">one<div arg="two">two</div arg="two">one<div arg="three">three</div arg="three">one</div arg="one">', $out );
+	}
+
+	/**
 	 * @ticket 6518
 	 */
 	function test_tag_escaped() {
