Skip to content

Change NSURL.description to match Darwin #1312

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

Merged
merged 1 commit into from
Nov 10, 2017
Merged

Conversation

jaysk1
Copy link
Contributor

@jaysk1 jaysk1 commented Nov 10, 2017

Consider this program

import Foundation

let nsurl = NSURL(string: "http://google.com")!
let url = URL(string: "http://amazon.in")!

print(url)
print(nsurl)

Output on Darwin

http://amazon.in
http://google.com

Output on Linux

<CFURL 0x8eb3ed0 [0x7f7f63d54c38]>{string = http://amazon.in, encoding = 134217984, base = (null)}
<CFURL 0x8e41620 [0x7f7f63d54c38]>{string = http://google.com, encoding = 134217984, base = (null)}

This PR makes the output on Linux same as that on Darwin.

@ianpartridge
Copy link
Contributor

Thanks! Can we add a test too?

@jaysk1 jaysk1 force-pushed the urldesc branch 3 times, most recently from dad4909 to 7aa6b24 Compare November 10, 2017 11:19
@jaysk1
Copy link
Contributor Author

jaysk1 commented Nov 10, 2017

@ianpartridge : Added Test case to test URL.description under TestURL.swift.

@alblue
Copy link
Contributor

alblue commented Nov 10, 2017

@swift-ci please test and merge

1 similar comment
@pushkarnk
Copy link
Member

@swift-ci please test and merge

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

Successfully merging this pull request may close these issues.

5 participants