code: def test_exec_with_filename_interpolation(self, posix):
      input_config = """
  [post_write_hooks]
  hooks = ruff
  ruff.type = exec
  ruff.executable = ruff
  ruff.options = arg1 REVISION_SCRIPT_FILENAME 'multi-word arg' \
      --flag1='REVISION_SCRIPT_FILENAME'
          """
  
      def expected_additional_arguments_fn(rev_path):
          if compat.is_posix:
              return [
                  "arg1",
                  rev_path,
                  "multi-word arg",
                  "--flag1=" + rev_path,
              ]
          else:
              return [
                  "arg1",
                  rev_path,
                  "'multi-word arg'",
                  "--flag1='%s'" % rev_path,
              ]
  
      with mock.patch("alembic.util.compat.is_posix", posix):
          self._run_ruff_with_config(
              input_config, expected_additional_arguments_fn
          )
  
imports: import os
  import sys
  from alembic import command
  from alembic import util
  from alembic.script import write_hooks
  from alembic.testing import assert_raises_message
  from alembic.testing import combinations
  from alembic.testing import eq_
  from alembic.testing import mock
  from alembic.testing import TestBase
  from alembic.testing.env import _get_staging_directory
  from alembic.testing.env import _no_sql_testing_config
  from alembic.testing.env import clear_staging_env
  from alembic.testing.env import staging_env
  from alembic.util import compat
label_desc: Use image node_id 18 for calling the RunHookTest obj's underlying member method code with example usage: obj.test_exec_with_filename_interpolation(posix) and returns: list, list