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