Index: tests/phpunit/tests/post/query.php
===================================================================
--- tests/phpunit/tests/post/query.php	(revision 27412)
+++ tests/phpunit/tests/post/query.php	(working copy)
@@ -666,6 +666,24 @@
 	}
 
 	/**
+	 * @group marko
+	 */
+	function test_query_with_sticky_posts() {
+		$post_ids = $this->factory->post->create_many( 10 );
+
+		stick_post( $post_ids[8] );
+
+		$query = new WP_Query( array(
+			'orderby'        => 'post__in',
+			'post__in'       => $post_ids,
+			'posts_per_page' => 3
+		) );
+
+		$posts = $query->get_posts();
+		$this->assertEquals( 3, count( $posts ) );
+	}
+
+	/**
 	 * Use with the_posts filter, appends a post and adds some custom data.
 	 */
 	function the_posts_filter( $posts ) {
