@@ -325,6 +325,15 @@ def test_install_interactive4(self):
325
325
self .assertFalse (config .git )
326
326
self .assertFalse (config .gitlfs )
327
327
328
+ def test_install_interactive5 (self ):
329
+ self .papers (f"""install --local --filesdir files --bibtex bibbib.bib << EOF
330
+ y
331
+
332
+ EOF""" )
333
+ config = Config .load (self ._path (".papers/config.json" ))
334
+ self .assertTrue (config .git )
335
+ self .assertFalse (config .gitlfs )
336
+
328
337
329
338
class TestUndoGitLocal (TestBaseInstall ):
330
339
@@ -413,4 +422,31 @@ def test_undo(self):
413
422
414
423
self .papers (f'redo --bibtex { self .mybib } --files { self .filesdir } ' )
415
424
biblio = Biblio .load (self ._path (self .mybib ), '' )
416
- self .assertEqual (len (biblio .entries ), 1 )
425
+ self .assertEqual (len (biblio .entries ), 1 )
426
+
427
+
428
+
429
+ class TestUninstall (LocalInstallTest ):
430
+ def test_uninstall (self ):
431
+ self .assertTrue (self ._exists (".papers/config.json" ))
432
+ self .papers (f'uninstall' )
433
+ self .assertFalse (self ._exists (".papers/config.json" ))
434
+
435
+
436
+ class TestUninstall2 (GlobalInstallTest ):
437
+ def test_uninstall (self ):
438
+ self .assertTrue (self ._exists (CONFIG_FILE ))
439
+ self .papers (f'install --force --local' )
440
+ self .assertTrue (self ._exists (".papers/config.json" ))
441
+ self .assertTrue (self ._exists (CONFIG_FILE ))
442
+ self .papers (f'uninstall' )
443
+ self .assertFalse (self ._exists (".papers/config.json" ))
444
+ self .assertTrue (self ._exists (CONFIG_FILE ))
445
+
446
+ def test_uninstall (self ):
447
+ self .papers (f'install --force --local' )
448
+ self .assertTrue (self ._exists (".papers/config.json" ))
449
+ self .assertTrue (self ._exists (CONFIG_FILE ))
450
+ self .papers (f'uninstall --recursive' )
451
+ self .assertFalse (self ._exists (".papers/config.json" ))
452
+ self .assertFalse (self ._exists (CONFIG_FILE ))
0 commit comments