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:
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user