The test program in lsametst.f tests all combinations of the same character in upper and lower case for A and B, and two cases where A and B are different characters.
Run the test program by typing testlsame. If LSAME works correctly, the only message you should see after the execution of testlsame is
ASCII character set Tests completedThe file lsame.f is automatically copied to LAPACK/BLAS/SRC/ and LAPACK/SRC/. The function LSAME is needed by both the BLAS and LAPACK, so it is safer to have it in both libraries as long as this does not cause trouble in the link phase when both libraries are used.