Changeset 13904


Ignore:
Timestamp:
Jan 30, 2013, 9:26:04 PM (8 years ago)
Author:
jordan
Message:

(libT) add to rename-tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/rename-test.c

    r13885 r13904  
    216216  check_int_eq (0, torrentRenameAndWait (tor, tor->info.name, "foobar"));
    217217  check (!tr_fileExists (tmpstr, NULL)); /* confirm the old filename can't be found */
     218  tr_free (tmpstr);
    218219  check (tor->info.files[0].is_renamed); /* confirm the file's 'renamed' flag is set */
    219220  check_streq ("foobar", tr_torrentName(tor)); /* confirm the torrent's name is now 'foobar' */
    220   check_streq ("foobar", tor->info.files[0].name); /* confirm the file's name is now 'foobar' */
     221  check_streq ("foobar", tor->info.files[0].name); /* confirm the file's name is now 'foobar' in our struct */
    221222  check (strstr (tor->info.torrent, "foobar") == NULL); /* confirm the name in the .torrent file hasn't changed */
     223  tmpstr = tr_buildPath (tor->currentDir, "foobar", NULL);
     224  check (tr_fileExists (tmpstr, NULL)); /* confirm the file's name is now 'foobar' on the disk */
     225  tr_free (tmpstr);
    222226  check (testFileExistsAndConsistsOfThisString (tor, 0, "hello, world!\n")); /* confirm the contents are right */
    223   tr_free (tmpstr);
    224227
    225228  /* (while it's renamed: confirm that the .resume file remembers the changes) */
Note: See TracChangeset for help on using the changeset viewer.