Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aae628b4 authored by Joe Onorato's avatar Joe Onorato
Browse files

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)
parent 7d619f18
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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"));
    }
}
+1 −0
Original line number Diff line number Diff line
@@ -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
+1 −0
Original line number Diff line number Diff line
@@ -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