commit b75f27346792232a29ddde1669a2db990c84fc2a
Author: Lee Rowlands <lee.rowlands@previousnext.com.au>
Date:   Mon Mar 25 18:49:03 2013 +1000

    fail patch

diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
index 3c54ad4..75cfe31 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php
@@ -477,6 +477,11 @@ function testLibraryRender() {
     $styles = drupal_get_css();
     $this->assertTrue(strpos($scripts, 'core/misc/farbtastic/farbtastic.js'), 'JavaScript of library was added to the page.');
     $this->assertTrue(strpos($styles, 'core/misc/farbtastic/farbtastic.css'), 'Stylesheet of library was added to the page.');
+
+    $result = drupal_add_library('common_test', 'magicalpony.plugin');
+    $path = drupal_get_path('module', 'common_test') . '/js/magic.pony.js';
+    $scripts = drupal_get_js();
+    $this->assertTrue(strpos($scripts, $path), 'JavaScript of magical pony plugin library was added to the page.');
   }
 
   /**
diff --git a/core/modules/system/tests/modules/common_test/common_test.module b/core/modules/system/tests/modules/common_test/common_test.module
index f932f0f..741c5ec 100644
--- a/core/modules/system/tests/modules/common_test/common_test.module
+++ b/core/modules/system/tests/modules/common_test/common_test.module
@@ -290,6 +290,18 @@ function common_test_library_info() {
       array('system', 'jquery'),
     ),
   );
+  $libraries['magicalpony.plugin'] = array(
+    'title' => 'Tony the Magical Pony Plugin',
+    'website' => 'http://www.tonythemagicalpony.org/',
+    'version' => '0.8.3.37',
+    'js' => array(
+      // Note uses the short (non-array) format.
+      drupal_get_path('module', 'common_test') . '/js/magic.pony.js',
+    ),
+    'dependencies' => array(
+      array('system', 'jquery'),
+    ),
+  );
   return $libraries;
 }
 
diff --git a/core/modules/system/tests/modules/common_test/js/magic.pony.js b/core/modules/system/tests/modules/common_test/js/magic.pony.js
new file mode 100644
index 0000000..1909731
--- /dev/null
+++ b/core/modules/system/tests/modules/common_test/js/magic.pony.js
@@ -0,0 +1,3 @@
+/**
+ * JavaScript file for the 'Tony the magical pony' plugin.
+ */
