Changeset 13835
- Timestamp:
- Jan 22, 2013, 5:06:38 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/rename-test.c
r13829 r13835 210 210 check (tr_fileExists (tmpstr, NULL)); 211 211 check_streq ("hello-world.txt", tr_torrentName(tor)); 212 check_int_eq (0, torrentRenameAndWait (tor, "hello-world.txt", "foobar"));213 check (!tr_fileExists (tmpstr, NULL)); 214 check (tor->info.files[0].is_renamed); 215 check_streq ("foobar", t or->info.files[0].name);216 check_streq ("foobar", t r_torrentName(tor));217 check (strstr (tor->info.torrent, "foobar") == NULL); 218 check (testFileExistsAndConsistsOfThisString (tor, 0, "hello, world!\n")); 212 check_int_eq (0, torrentRenameAndWait (tor, tor->info.name, "foobar")); 213 check (!tr_fileExists (tmpstr, NULL)); /* confirm the old filename can't be found */ 214 check (tor->info.files[0].is_renamed); /* confirm the file's 'renamed' flag is set */ 215 check_streq ("foobar", tr_torrentName(tor)); /* confirm the torrent's name is now 'foobar' */ 216 check_streq ("foobar", tor->info.files[0].name); /* confirm the file's name is now 'foobar' */ 217 check (strstr (tor->info.torrent, "foobar") == NULL); /* confirm the name in the .torrent file hasn't changed */ 218 check (testFileExistsAndConsistsOfThisString (tor, 0, "hello, world!\n")); /* confirm the contents are right */ 219 219 tr_free (tmpstr); 220 220
Note: See TracChangeset
for help on using the changeset viewer.