@@ -68,7 +68,7 @@ get_first_and_last_core_module_summaries() {
6868 @go.create_test_go_script \
6969 ' . "$_GO_USE_MODULES" "complete" "_foo/_plugh"' \
7070 ' . "$_GO_USE_MODULES" "_bar/_quux" "_foo/_plugh"' \
71- ' . "$_GO_USE_MODULES" "_frotz"' \
71+ ' . "$_GO_USE_MODULES" "_frotz" "_blorple" ' \
7272 ' @go "$@"'
7373
7474 # The first will be an absolute path because the script's _GO_ROOTDIR doesn't
@@ -81,6 +81,8 @@ get_first_and_last_core_module_summaries() {
8181 " _bar/_quux scripts/plugins/_bar/lib/_quux"
8282 " go:4 main"
8383 " _frotz scripts/lib/_frotz"
84+ " go:5 main"
85+ " _blorple lib/_blorple"
8486 " go:5 main" )
8587
8688 run " $TEST_GO_SCRIPT " modules --imported
@@ -91,8 +93,11 @@ get_first_and_last_core_module_summaries() {
9193 local expected=(' From the core framework library:'
9294 " ${CORE_MODULES[@]/#/ } "
9395 ' '
94- ' From the project library:'
95- " ${TEST_PROJECT_MODULES[@]/#/ } "
96+ ' From the internal project library:'
97+ " ${TEST_INTERNAL_MODULES[@]/#/ } "
98+ ' '
99+ ' From the public project library:'
100+ " ${TEST_PUBLIC_MODULES[@]/#/ } "
96101 ' '
97102 ' From the installed plugin libraries:'
98103 " ${TEST_PLUGIN_MODULES[@]/#/ } "
@@ -104,7 +109,8 @@ get_first_and_last_core_module_summaries() {
104109
105110@test " $SUITE : list using glob, all modules" {
106111 local expected=(" ${CORE_MODULES[@]} "
107- " ${TEST_PROJECT_MODULES[@]} "
112+ " ${TEST_INTERNAL_MODULES[@]} "
113+ " ${TEST_PUBLIC_MODULES[@]} "
108114 " ${TEST_PLUGIN_MODULES[@]} "
109115 )
110116
@@ -118,14 +124,16 @@ get_first_and_last_core_module_summaries() {
118124 )
119125
120126 rm " ${TEST_PLUGIN_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } " \
121- " ${TEST_PROJECT_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } "
127+ " ${TEST_INTERNAL_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } " \
128+ " ${TEST_PUBLIC_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } "
122129 run " $TEST_GO_SCRIPT " modules
123130 assert_success " ${expected[@]} "
124131}
125132
126133@test " $SUITE : list using glob, only core modules present" {
127134 rm " ${TEST_PLUGIN_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } " \
128- " ${TEST_PROJECT_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } "
135+ " ${TEST_INTERNAL_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } " \
136+ " ${TEST_PUBLIC_MODULES_PATHS[@]/#/ $TEST_GO_ROOTDIR / } "
129137 run " $TEST_GO_SCRIPT " modules ' *'
130138 assert_success " ${CORE_MODULES[@]} "
131139}
@@ -141,6 +149,8 @@ get_first_and_last_core_module_summaries() {
141149 # Note the padding is relative to only the project modules.
142150 assert_output_matches $' _frobozz scripts/lib/_frobozz\n '
143151 assert_output_matches $' _frotz scripts/lib/_frotz\n\n '
152+ assert_output_matches $' _blorple lib/_blorple\n '
153+ assert_output_matches $' _rezrov lib/_rezrov\n\n '
144154
145155 # Note the padding is relative to only the plugin modules. Use a variable to
146156 # keep the assertion lines under 80 columns. Bats trims the last newline of
@@ -150,9 +160,9 @@ get_first_and_last_core_module_summaries() {
150160 assert_output_matches " _foo/_quux $plugins /_foo/lib/_quux" $' \n '
151161 assert_output_matches " _foo/_xyzzy $plugins /_foo/lib/_xyzzy$"
152162
153- # Since the 'lines' array doesn't contain blank lines, we only add '3 ' to
163+ # Since the 'lines' array doesn't contain blank lines, we only add '4 ' to
154164 # account for the 'From the...' line starting each class section.
155- assert_equal " $(( TOTAL_NUM_MODULES + 3 )) " " ${# lines[@]} "
165+ assert_equal " $(( TOTAL_NUM_MODULES + 4 )) " " ${# lines[@]} "
156166}
157167
158168@test " $SUITE : paths using glob, all modules" {
@@ -170,6 +180,10 @@ get_first_and_last_core_module_summaries() {
170180 $' \n _frobozz +scripts/lib/_frobozz\n '
171181 assert_output_matches \
172182 $' \n _frotz +scripts/lib/_frotz\n '
183+ assert_output_matches \
184+ $' \n _blorple +lib/_blorple\n '
185+ assert_output_matches \
186+ $' \n _rezrov +lib/_rezrov\n '
173187 assert_output_matches \
174188 $' \n _bar/_plugh +scripts/plugins/_bar/lib/_plugh\n '
175189 assert_output_matches \
@@ -192,16 +206,18 @@ get_first_and_last_core_module_summaries() {
192206 # Note the padding is relative to only the project modules.
193207 assert_output_matches $' _frobozz Summary for _frobozz\n '
194208 assert_output_matches $' _frotz Summary for _frotz\n '
209+ assert_output_matches $' _blorple Summary for _blorple\n '
210+ assert_output_matches $' _rezrov Summary for _rezrov\n '
195211
196212 # Note the padding is relative to only the plugin modules. Bats trims
197213 # the last newline of the output.
198214 assert_output_matches $' _bar/_plugh Summary for _bar/_plugh\n '
199215 assert_output_matches $' _foo/_quux Summary for _foo/_quux\n '
200216 assert_output_matches ' _foo/_xyzzy Summary for _foo/_xyzzy$'
201217
202- # Since the 'lines' array doesn't contain blank lines, we only add '3 ' to
218+ # Since the 'lines' array doesn't contain blank lines, we only add '4 ' to
203219 # account for the 'From the...' line starting each class section.
204- assert_equal " $(( TOTAL_NUM_MODULES + 3 )) " " ${# lines[@]} "
220+ assert_equal " $(( TOTAL_NUM_MODULES + 4 )) " " ${# lines[@]} "
205221}
206222
207223@test " $SUITE : summaries using glob, all modules" {
@@ -216,6 +232,8 @@ get_first_and_last_core_module_summaries() {
216232 assert_output_matches " $LAST_CORE_MODULE +$LAST_CORE_MOD_SUMMARY " $' \n '
217233 assert_output_matches $' _frobozz +Summary for _frobozz\n '
218234 assert_output_matches $' _frotz +Summary for _frotz\n '
235+ assert_output_matches $' _blorple +Summary for _blorple\n '
236+ assert_output_matches $' _rezrov +Summary for _rezrov\n '
219237 assert_output_matches $' _bar/_plugh +Summary for _bar/_plugh\n '
220238 assert_output_matches $' _foo/_quux +Summary for _foo/_quux\n '
221239 assert_output_matches $' _foo/_xyzzy +Summary for _foo/_xyzzy$'
@@ -225,12 +243,13 @@ get_first_and_last_core_module_summaries() {
225243
226244@test " $SUITE : list only test modules" {
227245 run " $TEST_GO_SCRIPT " modules ' _*'
228- assert_success " ${TEST_PROJECT_MODULES[@]} " " ${TEST_PLUGIN_MODULES[@]} "
246+ assert_success " ${TEST_INTERNAL_MODULES[@]} " " ${TEST_PUBLIC_MODULES[@]} " \
247+ " ${TEST_PLUGIN_MODULES[@]} "
229248}
230249
231250@test " $SUITE : list only test project modules" {
232- run " $TEST_GO_SCRIPT " modules ' _fr*'
233- assert_success " ${TEST_PROJECT_MODULES [@]} "
251+ run " $TEST_GO_SCRIPT " modules ' _fr*' ' _blor* ' ' _rezr* '
252+ assert_success " ${TEST_INTERNAL_MODULES[@]} " " ${TEST_PUBLIC_MODULES [@]}"
234253}
235254
236255@test " $SUITE : list only modules in the _bar and _baz plugins" {
0 commit comments