@@ -78,6 +78,51 @@ testReportCustomRepository() {
78
78
assertCapturedSuccess
79
79
}
80
80
81
+ testCompileEmpty () {
82
+ compile " empty"
83
+ assertCaptured " You have no packages listed in your Aptfile"
84
+ assertNotCaptured " Updating apt caches"
85
+ assertCapturedSuccess
86
+ }
87
+
88
+ testReportEmpty () {
89
+ report " empty"
90
+ assertNotCaptured " ^packages"
91
+ assertNotCaptured " custom_packages"
92
+ assertNotCaptured " custom_repositories"
93
+ assertCapturedSuccess
94
+ }
95
+
96
+ testCompileOnlyComments () {
97
+ compile " only-comments"
98
+ assertCaptured " You have no packages listed in your Aptfile"
99
+ assertNotCaptured " Updating apt caches"
100
+ assertCapturedSuccess
101
+ }
102
+
103
+ testReportOnlyComments () {
104
+ report " only-comments"
105
+ assertNotCaptured " ^packages"
106
+ assertNotCaptured " custom_packages"
107
+ assertNotCaptured " custom_repositories"
108
+ assertCapturedSuccess
109
+ }
110
+
111
+ testCompileCustomRepositoryNoPackages () {
112
+ compile " custom-repository-no-packages"
113
+ assertCaptured " You have no packages listed in your Aptfile"
114
+ assertNotCaptured " Updating apt caches"
115
+ assertCapturedSuccess
116
+ }
117
+
118
+ testReportCustomRepositoryNoPackages () {
119
+ report " custom-repository-no-packages"
120
+ assertNotCaptured " ^packages"
121
+ assertNotCaptured " custom_packages"
122
+ assertCaptured " custom_repositories: \" deb http://us.archive.ubuntu.com/ubuntu/ jammy multiverse\" "
123
+ assertCapturedSuccess
124
+ }
125
+
81
126
pushd " $( dirname 0) " > /dev/null || exit 1
82
127
popd > /dev/null || exit 1
83
128
0 commit comments