code: def test_plots_path_is_quoted_and_resolved_properly(
      tmp_dir,
      dvc,
      mocker,
      capsys,
      output,
      expected_url_path,
      plots_data,
  ):
      cli_args = parse_args(
          ["plots", "diff", "--targets", "datafile", "--out", output]
      )
      cmd = cli_args.func(cli_args)
      mocker.patch("dvc.repo.plots.diff.diff", return_value=plots_data)
  
      assert cmd.run() == 0
      expected_url = posixpath.join(tmp_dir.as_uri(), expected_url_path)
  
      out, _ = capsys.readouterr()
      assert expected_url in out
  
imports: import json
  import os
  import posixpath
  from pathlib import Path
  import pytest
  from funcy import set_in
  from dvc.cli import parse_args
  from dvc.commands.plots import CmdPlotsDiff, CmdPlotsShow, CmdPlotsTemplates
  from dvc.render.match import RendererWithErrors
  from dvc.utils.serialize import YAMLFileCorruptedError
label_desc: Use image node_id 8 for calling a global function with example usage: test_plots_path_is_quoted_and_resolved_properly(tmp_dir, dvc, mocker, capsys, output, expected_url_path, plots_data) without return types