test: buffer should always be stringified#12355
test: buffer should always be stringified#12355lucamaraschi wants to merge 1 commit intonodejs:masterfrom
Conversation
There was a problem hiding this comment.
BTW, why 'a', not 'w'?
There was a problem hiding this comment.
Perhaps we can test with all the flags.
There was a problem hiding this comment.
I think testing with all flags is an overhead as we are not testing for the fd but for the buffer type. @vsemozhetbyt and @thefourtheye what do u think about it?
There was a problem hiding this comment.
I would suggest moving the common.refreshTmpDir() out of the loop and using 'w' here, that’s much cleaner.
There was a problem hiding this comment.
Nit: I think ensures will be more suitable than insures
There was a problem hiding this comment.
Ooops...good catch!
There was a problem hiding this comment.
Also, I don’t quite understand the statement here – you talk about input buffers for writeSync, but the only time you are actually using buffers is in the readFileSync output?
There was a problem hiding this comment.
^ I think this comment is still unaddressed? It’s just a comment but it’s really a bit confusing.
af6825b to
e6d70ae
Compare
There was a problem hiding this comment.
I would suggest moving the common.refreshTmpDir() out of the loop and using 'w' here, that’s much cleaner.
There was a problem hiding this comment.
Also, I don’t quite understand the statement here – you talk about input buffers for writeSync, but the only time you are actually using buffers is in the readFileSync output?
e6d70ae to
b5db315
Compare
There was a problem hiding this comment.
This removes and creates the temporary directory, so this should be before the tests.
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input.
b5db315 to
38c76ee
Compare
|
@addaleax and @thefourtheye does my last change make sense to you? |
|
CI failure on Windows looks unrelated. |
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
Landed in 9e26347 |
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
Landed on v6.x, LMK if it shouldn't have. |
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: #12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This test makes sure that independently of the buffer type, the input is always stringified and generates a valid input. PR-URL: nodejs/node#12355 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
This test makes sure that independently of the buffer type, the input
is always stringify and generates a valid input.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test fs