Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENLINE does not convert line endings to native OS format #2191

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

ENLINE does not convert line endings to native OS format #2191

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: abolka

Contrary to the docstring, ENLINE seemingly only ever converts/normalises line endings to CRLF.

On Linux (native line ending: LF), I'd expect the following to hold:

"foo^/bar" = enline "foo^/bar"

Imported from: CureCode [ Version: r3 master Type: Bug Platform: All Category: Native Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#2191

Comments:

Rebolbot commented on Jan 26, 2015:

Submitted by: abolka

In the core-tests suite.


Rebolbot added Type.bug and Test.written on Jan 12, 2016


Hostilefork added Type.bug, Test.written, Ren.important on Mar 26, 2018


Hostilefork commented on Mar 26, 2018:

Regardless of what the docstring says, having the same code process the same data on different platforms differently is a variation in behavior that is a fairly questionable idea.

There may not be as much benefit to embracing such variations as there is to pushing people away from the need for CR LF in general. See comment here:

metaeducation#1517 (comment)

These are the tests which were added, which show the behavior that I don't think is necessarily a great idea:

[    
    equal?
        "^/"
        deline choose [
            system/version/4 = 3  "^M^/" ; CR LF on Windows
            true                  "^/"   ; LF elsewhere
        ]
]

[
    equal?
        enline "^/"
        choose [
            system/version/4 = 3  "^M^/" ; CR LF on Windows
            true                  "^/"   ; LF elsewhere
        ]
]

Hostilefork mentioned this issue on Mar 26, 2018:
ENLINE doesn't handle block! arguments.


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

No branches or pull requests

1 participant