Without the "./" it was giving a "./test.sh: test_common.lib: not found" error under sh and ksh.
As for the explanation of how the ". test_common.lib" line works, here's how:
When you run . test_common.lib, or in my case . ./test_common.lib, the statements in the test_common.lib file are processed inside the calling shell itself, unlike when you just run ./test_common.lib (this forks a seperate process). Because the calling shell processes these, any statements such as variable definitions, function definitions, etc are stored in the calling shell and are available for later use.
The line
. test_common.lib though executes successfully in the script, the get_info function is not able to execute as the definition for get_info is not made available.
When i ran . ./test_common.lib.
It's proceeding further by calling the function.
I am using bash scripting.