9 BPTR lockin
= BNULL
, lockout
= BNULL
;
13 char *pathin
, *pathout
= NULL
;
16 TEST( (lockin
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
17 TEST( chdir( pathin
) == 0 );
18 pathout
= getcwd( NULL
, 0 );
19 TEST( (lockout
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
20 TEST( SameLock( lockin
, lockout
) == LOCK_SAME
);
21 free( pathout
); pathout
= NULL
;
22 UnLock( lockin
); lockin
= BNULL
;
23 UnLock( lockout
); lockout
= BNULL
;
26 TEST( (lockin
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
27 TEST( chdir( pathin
) == 0 );
28 pathout
= getcwd( NULL
, 0 );
29 TEST( (lockout
= Lock( pathin
, SHARED_LOCK
)) != BNULL
);
30 TEST( SameLock( lockin
, lockout
) == LOCK_SAME
);
31 free( pathout
); pathout
= NULL
;
32 UnLock( lockin
); lockin
= BNULL
;
33 UnLock( lockout
); lockout
= BNULL
;
40 if ( lockin
!= BNULL
)
42 if ( lockout
!= BNULL
)