Skip to content

Fix incorrect newline assertion in file I/O execution test #153

Description

@coderabbitai

Issue Description

The test assertion in tests/file_io_execution_test.rs around line 119 incorrectly expects a literal escaped sequence instead of an actual newline character.

Problem Details

File: tests/file_io_execution_test.rs
Location: Around line 119
Current assertion:

assert_eq!(
    file_contents.trim(),
    "Line 1\\\\nLine 2",  // Expects literal backslashes
    "Appended file contents don't match expected value"
);

Expected assertion:

assert_eq!(
    file_contents.trim(),
    "Line 1\nLine 2",  // Expects actual newline
    "Appended file contents don't match expected value"
);

Context

The WFL code uses "\\nLine 2" which should result in a newline character when executed, not the literal backslash-n sequence. The test assertion should match the actual runtime output.

Backlinks

Reported by

@logbie

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions