DRY: Avoid repetitions in script_test

Simple "don't repeat yourself" changes in script_test.
Nit: Could be a const reference I guess, not that it matters hard here...