| 80 | |
| 81 | |
| 82 | def test_add_all(testrepo: Repository) -> None: |
| 83 | clear(testrepo) |
| 84 | |
| 85 | sha_bye = '0907563af06c7464d62a70cdd135a6ba7d2b41d8' |
| 86 | sha_hello = 'a520c24d85fbfc815d385957eed41406ca5a860b' |
| 87 | |
| 88 | index = testrepo.index |
| 89 | index.add_all(['*.txt']) |
| 90 | |
| 91 | assert 'bye.txt' in index |
| 92 | assert 'hello.txt' in index |
| 93 | |
| 94 | assert index['bye.txt'].id == sha_bye |
| 95 | assert index['hello.txt'].id == sha_hello |
| 96 | |
| 97 | clear(testrepo) |
| 98 | |
| 99 | index.add_all(['bye.t??', 'hello.*']) |
| 100 | assert 'bye.txt' in index |
| 101 | assert 'hello.txt' in index |
| 102 | |
| 103 | assert index['bye.txt'].id == sha_bye |
| 104 | assert index['hello.txt'].id == sha_hello |
| 105 | |
| 106 | clear(testrepo) |
| 107 | |
| 108 | index.add_all(['[byehlo]*.txt']) |
| 109 | assert 'bye.txt' in index |
| 110 | assert 'hello.txt' in index |
| 111 | |
| 112 | assert index['bye.txt'].id == sha_bye |
| 113 | assert index['hello.txt'].id == sha_hello |
| 114 | |
| 115 | |
| 116 | def test_add_all_aspath(testrepo: Repository) -> None: |