Skip to content

Commit 68b96c9

Browse files
committed
MacOS LIBS "-framework X" with no libs fail test
1 parent 154730c commit 68b96c9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

t/Liblist_Kid.t

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ sub test_kid_unix_os2 {
133133
like( $out[2], $qlibre, 'existing file results in quoted ldloadlibs' );
134134
ok $out[3], 'existing file results in true LD_RUN_PATH';
135135
is_deeply [ _ext( '-L. -lnotthere' ) ], [ ('') x 4 ], 'non-present lib = empty';
136+
if ($^O eq 'darwin') {
137+
my @got = _ext( '-framework Something -L. -lfoo' );
138+
like $got[0], qr/Something/, '-framework with other lib works' or diag explain \@got;
139+
like $got[2], qr/Something/, '-framework with other lib works' or diag explain \@got;
140+
@got = _ext( '-framework Something' );
141+
like $got[0], qr/Something/, 'no drop -framework without other lib' or diag explain \@got;
142+
like $got[2], qr/Something/, 'no drop -framework without other lib' or diag explain \@got;
143+
}
136144
my $curr_dirspace = File::Spec->rel2abs( 'di r' );
137145
my $cmd_frag = '-L'.quote($curr_dirspace) . ' -ldir_test';
138146
is_deeply [ _ext( '-L"di r" -ldir_test' ) ], [ $cmd_frag, '', $cmd_frag, $curr_dirspace ], '-L directories with spaces work';

0 commit comments

Comments
 (0)