Index: modules/update/tests/no-updates.xml
===================================================================
RCS file: modules/update/tests/no-updates.xml
diff -N modules/update/tests/no-updates.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/update/tests/no-updates.xml	16 Aug 2009 18:57:11 -0000
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+  <terms>
+   <term><name>Projects</name><value>Drupal project</value></term>
+  </terms>
+<releases>
+ <release>
+  <name>Drupal 7.0</name>
+  <version>7.0</version>
+  <tag>DRUPAL--7-0</tag>
+  <version_major>7</version_major>
+  <version_patch>0</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-0-release</release_link>
+  <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+  <date>1250424521</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>1073741824</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+  </terms>
+ </release>
+</releases>
+</project>
Index: modules/update/tests/normal-update.xml
===================================================================
RCS file: modules/update/tests/normal-update.xml
diff -N modules/update/tests/normal-update.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/update/tests/normal-update.xml	16 Aug 2009 18:57:11 -0000
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+  <terms>
+   <term><name>Projects</name><value>Drupal project</value></term>
+  </terms>
+<releases>
+ <release>
+  <name>Drupal 7.1</name>
+  <version>7.1</version>
+  <tag>DRUPAL--7-1</tag>
+  <version_major>7</version_major>
+  <version_patch>1</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-1-release</release_link>
+  <download_link>http://example.com/drupal-7-1.tar.gz</download_link>
+  <date>1250424581</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>2147483648</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+  </terms>
+ </release>
+ <release>
+  <name>Drupal 7.0</name>
+  <version>7.0</version>
+  <tag>DRUPAL--7-0</tag>
+  <version_major>7</version_major>
+  <version_patch>0</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-0-release</release_link>
+  <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+  <date>1250424521</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>1073741824</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+  </terms>
+ </release>
+</releases>
+</project>
Index: modules/update/tests/security-update.xml
===================================================================
RCS file: modules/update/tests/security-update.xml
diff -N modules/update/tests/security-update.xml
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/update/tests/security-update.xml	16 Aug 2009 18:57:11 -0000
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project xmlns:dc="http://purl.org/dc/elements/1.1/">
+<title>Drupal</title>
+<short_name>drupal</short_name>
+<dc:creator>Drupal</dc:creator>
+<api_version>7.x</api_version>
+<recommended_major>7</recommended_major>
+<supported_majors>7</supported_majors>
+<default_major>7</default_major>
+<project_status>published</project_status>
+<link>http://example.com/project/drupal</link>
+  <terms>
+   <term><name>Projects</name><value>Drupal project</value></term>
+  </terms>
+<releases>
+ <release>
+  <name>Drupal 7.2</name>
+  <version>7.2</version>
+  <tag>DRUPAL--7-2</tag>
+  <version_major>7</version_major>
+  <version_patch>2</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-2-release</release_link>
+  <download_link>http://example.com/drupal-7-2.tar.gz</download_link>
+  <date>1250424641</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>4294967296</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+   <term><name>Release type</name><value>Security update</value></term>
+  </terms>
+ </release>
+ <release>
+  <name>Drupal 7.1</name>
+  <version>7.1</version>
+  <tag>DRUPAL--7-1</tag>
+  <version_major>7</version_major>
+  <version_patch>1</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-1-release</release_link>
+  <download_link>http://example.com/drupal-7-1.tar.gz</download_link>
+  <date>1250424581</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>2147483648</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+  </terms>
+ </release>
+ <release>
+  <name>Drupal 7.0</name>
+  <version>7.0</version>
+  <tag>DRUPAL--7-0</tag>
+  <version_major>7</version_major>
+  <version_patch>0</version_patch>
+  <status>published</status>
+  <release_link>http://example.com/drupal-7-0-release</release_link>
+  <download_link>http://example.com/drupal-7-0.tar.gz</download_link>
+  <date>1250424521</date>
+  <mdhash>b966255555d9c9b86d480ca08cfaa98e</mdhash>
+  <filesize>1073741824</filesize>
+  <terms>
+   <term><name>Release type</name><value>New features</value></term>
+   <term><name>Release type</name><value>Bug fixes</value></term>
+  </terms>
+ </release>
+</releases>
+</project>
Index: modules/update/update.info
===================================================================
RCS file: /cvs/drupal/drupal/modules/update/update.info,v
retrieving revision 1.5
diff -u -p -r1.5 update.info
--- modules/update/update.info	11 Oct 2008 02:33:12 -0000	1.5
+++ modules/update/update.info	16 Aug 2009 18:57:12 -0000
@@ -4,9 +4,10 @@ description = Checks the status of avail
 version = VERSION
 package = Core
 core = 7.x
-files[] = update.module
 files[] = update.compare.inc
 files[] = update.fetch.inc
+files[] = update.install
+files[] = update.module
 files[] = update.report.inc
 files[] = update.settings.inc
-files[] = update.install
+files[] = update.test
Index: modules/update/tests/update_test.info
===================================================================
RCS file: modules/update/tests/update_test.info
diff -N modules/update/tests/update_test.info
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/update/update_test.info	16 Aug 2009 18:57:12 -0000
@@ -0,0 +1,8 @@
+; $Id$
+name = Update test
+description = Support module for update module testing.
+package = Testing
+version = VERSION
+core = 7.x
+files[] = update_test.module
+hidden = TRUE
Index: modules/update/tests/update_test.module
===================================================================
RCS file: modules/update/tests/update_test.module
diff -N modules/update/tests/update_test.module
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/update/tests/update_test.module	16 Aug 2009 18:57:12 -0000
@@ -0,0 +1,37 @@
+<?php
+// $Id: session_test.module,v 1.10 2009/07/01 12:47:30 dries Exp $
+
+/**
+ * Implement hook_menu().
+ */
+function update_test_menu() {
+  $items = array();
+
+  $items['update-test'] = array(
+    'title' => t('Update test'),
+    'page callback' => 'update_test_mock_page',
+    'access callback' => TRUE,
+    'type' => MENU_CALLBACK,
+  );
+
+  return $items;
+}
+
+/**
+ * Implement hook_system_info_alter().
+ */
+function update_test_system_info_alter(&$info, $file) {
+  // Make all modules and themes' versions 7.0 for testing.
+  $info['version'] = '7.0';
+}
+
+/**
+ * Page callback, prints mock XML for the update module.
+ */
+function update_test_mock_page() {
+  $xml = variable_get('update_test_xml', FALSE);
+  // Note: this will cause an exception to occur if no variable was set and
+  // $file is FALSE.
+  file_put_contents('./debug.txt', $xml . "\n", FILE_APPEND);
+  print file_get_contents(drupal_get_path('module', 'update_test') . "/$xml");
+}
