# -*- mode:python; coding:utf-8; -*-

# The core difference between this test and the one of SharedObjectSuffixIssue
# is that here we explicitly use the relevant D tool and things work.

DefaultEnvironment(tools=[])
env = Environment(
    tools=['{0}', 'link']
)

shobj = env.SharedObject('code.d')
env.SharedLibrary('answer', shobj)
ver_lib = env.SharedLibrary('answer_versioned', shobj, SHLIBVERSION='1.1.1', SOVERSION='4')

shlibfile = ver_lib[0]
try:
    for (f,t) in ver_lib[0].attributes.shliblinks:
        print("SYMLINK:%s,%s"%(f,t))
except AttributeError:
    print("NOSYMLINK")
