Changeset 13836
- Timestamp:
- Jan 22, 2013, 5:40:10 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/rename-test.c
r13835 r13836 286 286 static const size_t totalSize = 67; 287 287 const tr_file * files; 288 const char * strings[4]; 288 289 const char * expected_files[4] = { 289 290 "Felidae/Felinae/Acinonyx/Cheetah/Chester", … … 414 415 415 416 check_int_eq (0, torrentRenameAndWait (tor, "Felidae", "gabba")); 416 check_streq ("gabba/Felinae/Acinonyx/Cheetah/Chester", files[0].name); 417 check_streq ("gabba/Felinae/Felis/catus/Kyphi", files[1].name); 418 check_streq ("gabba/Felinae/Felis/catus/Saffron", files[2].name); 419 check_streq ("gabba/Pantherinae/Panthera/Tiger/Tony", files[3].name); 417 strings[0] = "gabba/Felinae/Acinonyx/Cheetah/Chester"; 418 strings[1] = "gabba/Felinae/Felis/catus/Kyphi"; 419 strings[2] = "gabba/Felinae/Felis/catus/Saffron"; 420 strings[3] = "gabba/Pantherinae/Panthera/Tiger/Tony"; 421 for (i=0; i<4; ++i) 422 { 423 check_streq (strings[i], files[i].name); 424 testFileExistsAndConsistsOfThisString (tor, i, expected_contents[i]); 425 } 426 427 /* rename the root, then a branch, and then a leaf... */ 428 check_int_eq (0, torrentRenameAndWait (tor, "gabba", "Felidae")); 429 check_int_eq (0, torrentRenameAndWait (tor, "Felidae/Pantherinae/Panthera/Tiger", "Snow Leopard")); 430 check_int_eq (0, torrentRenameAndWait (tor, "Felidae/Pantherinae/Panthera/Snow Leopard/Tony", "10.6")); 431 strings[0] = "Felidae/Felinae/Acinonyx/Cheetah/Chester"; 432 strings[1] = "Felidae/Felinae/Felis/catus/Kyphi"; 433 strings[2] = "Felidae/Felinae/Felis/catus/Saffron"; 434 strings[3] = "Felidae/Pantherinae/Panthera/Snow Leopard/10.6"; 435 for (i=0; i<4; ++i) 436 { 437 check_streq (strings[i], files[i].name); 438 testFileExistsAndConsistsOfThisString (tor, i, expected_contents[i]); 439 } 420 440 421 441 /***
Note: See TracChangeset
for help on using the changeset viewer.