Add a test for .ar -r and fix a use-of-uninitialized-variable bug
FossilOrigin-Name: 978d5ed4379b631a79cd46a75d9b5b403f3ec4ce7d9d52ed36a5678cdf04f7f2
This commit is contained in:
parent
47061b9d57
commit
7774fc010a
17
manifest
17
manifest
@ -1,5 +1,5 @@
|
||||
C Add\s--remove\ssubcommand\sto\sshell's\s.archive\scommand
|
||||
D 2021-11-01T17:22:52.884
|
||||
C Add\sa\stest\sfor\s.ar\s-r\sand\sfix\sa\suse-of-uninitialized-variable\sbug
|
||||
D 2021-11-01T22:30:24.815
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@ -550,7 +550,7 @@ F src/random.c 097dc8b31b8fba5a9aca1697aeb9fd82078ec91be734c16bffda620ced7ab83c
|
||||
F src/resolve.c ae65c88f5d0d4bc0052b203773d407efa2387c2bd6b202f87178006c7bb8632c
|
||||
F src/rowset.c ba9515a922af32abe1f7d39406b9d35730ed65efab9443dc5702693b60854c92
|
||||
F src/select.c 32d25b5af6c708aa63373c78c2e59681910387a7a78c08ec3086cadc77d41627
|
||||
F src/shell.c.in a91cf2a1e3987e769e2286c4835d3f18b3c2d21cc9405699d2e4a2b06dc65c20
|
||||
F src/shell.c.in f2360d089ec7f5cca14a76f3a6f3f26fc349d97b8570edcc81522e7db9454262
|
||||
F src/sqlite.h.in 99786216caf1c57aa3d70f95a7f84566dff6a9eeb50174799ea3b387eafd2a22
|
||||
F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8
|
||||
F src/sqlite3ext.h d8f6f67ae9ad990a70dd03c093bcdc8883e159ff4bfd16a496f8fb80c6840b5a
|
||||
@ -1384,7 +1384,7 @@ F test/shell4.test 3ed6c4b42fd695efcbc25d69ef759dbb15855ca8e52ba6c5ee076f8b435f4
|
||||
F test/shell5.test 6e4aa0e531dcb8dcf74b7920a2a7442c6712d4dff8422bbc81f768f9dee8a0e3
|
||||
F test/shell6.test 1ceb51b2678c472ba6cf1e5da96679ce8347889fe2c3bf93a0e0fa73f00b00d3
|
||||
F test/shell7.test 115132f66d0463417f408562cc2cf534f6bbc6d83a6d50f0072a9eb171bae97f
|
||||
F test/shell8.test 96be02ea0c21f05b24c1883d7b711a1fa8525a68ab7b636aacf6057876941013
|
||||
F test/shell8.test b109236471b68749b0dd23d075626373397e609562a3f4c49548a4c971ef105b
|
||||
F test/shmlock.test 3dbf017d34ab0c60abe6a44e447d3552154bd0c87b41eaf5ceacd408dd13fda5
|
||||
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
||||
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
|
||||
@ -1930,10 +1930,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 92c3d253797f9bde4670984d60bbd50b7b28540d2b5f503f318843580bab8765
|
||||
R b00d6d0ab1960f3d74e9a78eaa3a2c49
|
||||
T *branch * archive_remove
|
||||
T *sym-archive_remove *
|
||||
T -sym-trunk *
|
||||
P 23525449b883ae6e1d62100bdbc9ff2ca788f67e8ae7d7e4b1a770413a70a7f0
|
||||
R 4c2f7fc16891edd4989a0a95daa18865
|
||||
U larrybr
|
||||
Z 7d1554c5ac914a1993ecf6506b6cbae4
|
||||
Z 406c0509493a4f18fbe952af95b3e75b
|
||||
|
@ -1 +1 @@
|
||||
23525449b883ae6e1d62100bdbc9ff2ca788f67e8ae7d7e4b1a770413a70a7f0
|
||||
978d5ed4379b631a79cd46a75d9b5b403f3ec4ce7d9d52ed36a5678cdf04f7f2
|
@ -6189,7 +6189,7 @@ static int arErrorMsg(ArCommand *pAr, const char *zFmt, ...){
|
||||
#define AR_SWITCH_FILE 9
|
||||
#define AR_SWITCH_DIRECTORY 10
|
||||
#define AR_SWITCH_APPEND 11
|
||||
#define AR_SWITCH_DRYRUN 12
|
||||
#define AR_SWITCH_DRYRUN 12
|
||||
|
||||
static int arProcessSwitch(ArCommand *pAr, int eSwitch, const char *zArg){
|
||||
switch( eSwitch ){
|
||||
@ -6494,7 +6494,7 @@ static int arListCommand(ArCommand *pAr){
|
||||
** Implementation of .ar "Remove" command.
|
||||
*/
|
||||
static int arRemoveCommand(ArCommand *pAr){
|
||||
int rc;
|
||||
int rc = 0;
|
||||
char *zSql = 0;
|
||||
char *zWhere = 0;
|
||||
|
||||
|
@ -44,6 +44,10 @@ proc populate_dir {dirname spec} {
|
||||
}
|
||||
}
|
||||
|
||||
proc dir_content {dirname} {
|
||||
lsort [glob -nocomplain $dirname/*]
|
||||
}
|
||||
|
||||
proc dir_to_list {dirname {n -1}} {
|
||||
if {$n<0} {set n [llength [file split $dirname]]}
|
||||
|
||||
@ -170,8 +174,20 @@ foreach {tn tcl} {
|
||||
}
|
||||
}
|
||||
|
||||
finish_test
|
||||
|
||||
|
||||
do_test 2.1.1 {
|
||||
populate_dir ar2 {
|
||||
file1 "abcd"
|
||||
file2 "efgh"
|
||||
dir1/file3 "ijkl"
|
||||
}
|
||||
populate_dir ar4 {
|
||||
file2 "efgh"
|
||||
}
|
||||
catchcmd shell8.db {.ar -c}
|
||||
catchcmd shell8.db {.ar -C ar2 -i .}
|
||||
catchcmd shell8.db {.ar -r ./file2 ./dir1}
|
||||
catchcmd shell8.db {.ar -C ar4 -x .}
|
||||
regsub -all {ar4} [dir_content ar4] ar2
|
||||
} {ar2/file1 ar2/file2}
|
||||
|
||||
finish_test
|
||||
|
Loading…
x
Reference in New Issue
Block a user