When you put c->a\nnote right: test you are defining the name of the second element as a\nnote right: test.
Use this instead:
@startuml
!definelong macro(additionalCommands="")
a->b
additionalCommands
note right: test
!enddefinelong
macro("c->a")
@enduml