Index: tests/shortcode.php
===================================================================
--- tests/shortcode.php	(revision 1209)
+++ tests/shortcode.php	(working copy)
@@ -29,6 +29,9 @@
 		$this->atts = $atts;
 		$this->content = $content;
 		$this->tagname = $tagname;
+		$this->filter_atts_out = null;
+		$this->filter_atts_pairs = null;
+		$this->filter_atts_atts = null;
 	}
 
 	// [footag foo="bar"]
@@ -41,7 +44,7 @@
 		extract(shortcode_atts(array(
 			'foo' => 'no foo',
 			'baz' => 'default baz',
-		), $atts));
+		), $atts, 'bartag'));
 
 		return "foo = {$foo}";
 	}
@@ -324,4 +327,52 @@
 		$this->assertEquals('after', strip_shortcodes('[gallery]after'));
 		$this->assertEquals('beforeafter', strip_shortcodes('before[gallery]after'));
 	}
+
+
+	// Store passed in shortcode_atts_{$shortcode} args
+	function _filter_atts( $out, $pairs, $atts ) {
+		$this->filter_atts_out = $out;
+		$this->filter_atts_pairs = $pairs;
+		$this->filter_atts_atts = $atts;
+		return $out;
+	}
+
+	// Filter shortcode atts in various ways
+	function _filter_atts2( $out, $pairs, $atts ) {
+		// If foo attribute equals "foo1", change it to be default value
+		if ( isset( $out['foo'] ) && 'foo1' == $out['foo'] )
+			$out['foo'] = $pairs['foo'];
+
+		// If baz attribute is set, remove it
+		if ( isset( $out['baz'] ) )
+			unset( $out['baz'] );
+
+		$this->filter_atts_out = $out;
+		return $out;
+	}
+
+	function test_shortcode_atts_filter_passes_original_arguments() {
+		add_filter( 'shortcode_atts_bartag', array( $this, '_filter_atts' ), 10, 3 );
+
+		do_shortcode('[bartag foo="foo1" /]');
+		$this->assertEquals( array( 'foo' => 'foo1', 'baz' => 'default baz' ), $this->filter_atts_out );
+		$this->assertEquals( array( 'foo' => 'no foo', 'baz' => 'default baz' ), $this->filter_atts_pairs );
+		$this->assertEquals( array( 'foo' => 'foo1' ), $this->filter_atts_atts );
+
+		remove_filter( 'shortcode_atts_bartag', array( $this, '_filter_atts' ), 10, 3 );
+	}
+
+	function test_shortcode_atts_filtering() {
+		add_filter( 'shortcode_atts_bartag', array( $this, '_filter_atts2' ), 10, 3 );
+
+		$out = do_shortcode('[bartag foo="foo1" baz="baz1" /]');
+		$this->assertEquals( array( 'foo' => 'no foo' ), $this->filter_atts_out );
+		$this->assertEquals( 'foo = no foo', $out );
+
+		$out = do_shortcode('[bartag foo="foo2" /]');
+		$this->assertEquals( 'foo = foo2', $out );
+
+		remove_filter( 'shortcode_atts_bartag', array( $this, '_filter_atts2' ), 10, 3 );
+	}
+
 }
