Extend native_call test
Fix test failure when output has trailing newline