test(agent-task create): quote file paths to pass CI on Windows

To keep the backslashes in Windows file paths and stop `shlex.Split`
from interpreting them as escape characters, we need to quote the paths.

Signed-off-by: Babak K. Shandiz <babakks@github.com>
This commit is contained in:
Babak K. Shandiz 2025-09-05 09:28:44 +01:00
parent 7824b43f8a
commit 004be9da20
No known key found for this signature in database
GPG key ID: 9472CAEFF56C742E

View file

@ -50,7 +50,7 @@ func TestNewCmdCreate(t *testing.T) {
},
{
name: "from-file success",
args: fmt.Sprintf("-F %s", tmpFile),
args: fmt.Sprintf("-F '%s'", tmpFile),
wantOpts: &CreateOptions{
ProblemStatement: "task description from file",
},
@ -75,7 +75,7 @@ func TestNewCmdCreate(t *testing.T) {
},
{
name: "empty file",
args: fmt.Sprintf("-F %s", tmpEmptyFile),
args: fmt.Sprintf("-F '%s'", tmpEmptyFile),
wantErr: "task description file is empty",
},
{