Test that we correctly back up an empty file.

(It turns out that we do.  It didn't used to work, I'm not
sure what changed)
This commit is contained in:
Joe Onorato
2009-06-26 12:57:45 -04:00
parent 7d619f18a2
commit aae628b445
3 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,8 @@ public class BackupTestAgent extends BackupHelperAgent
{
public void onCreate() {
addHelper("data_files", new FileBackupHelper(this, BackupTestActivity.FILE_NAME));
addHelper("more_data_files", new FileBackupHelper(this, "another_file.txt", "3.txt"));
addHelper("more_data_files", new FileBackupHelper(this, "another_file.txt", "3.txt",
"empty.txt"));
}
}

View File

@ -12,6 +12,7 @@ adb shell "rm /data/data/com.android.backuptest/files/* ; \
echo -n first file > /data/data/com.android.backuptest/files/file.txt ; \
echo -n asdf > /data/data/com.android.backuptest/files/another_file.txt ; \
echo -n 3 > /data/data/com.android.backuptest/files/3.txt ; \
echo -n "" > /data/data/com.android.backuptest/files/empty.txt ; \
"
# say that the data has changed

View File

@ -35,6 +35,7 @@ echo
check_file file.txt "first file"
check_file another_file.txt "asdf"
check_file 3.txt "3"
check_file empty.txt ""
echo
echo