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

Add -h and --flow (on|off|keep) to run-*-test-suite #187

Merged
merged 1 commit into from
May 31, 2020

Conversation

perlpunk
Copy link
Member

@perlpunk perlpunk commented May 31, 2020

Because the yaml-test-suite will soon add the [] and {} flow collection styles to the event output, we need to be able to deal with both formats. This way, when switching to the new format, we just need to add the --flow parameter to the call.

This also makes it easier to test my recent fixes in flow style mode.

With --flow (keep|on) run-parser-test-suite will output:

+MAP {}
+SEQ []

run-emitter-test-suite will then emit flow style collections if requested:

echo 'foo: [bar, {x: y}]' | ./tests/run-parser-test-suite | ./tests/run-emitter-test-suite
echo 'foo: [bar, {x: y}]' | ./tests/run-parser-test-suite \
    --flow keep | ./tests/run-emitter-test-suite --flow keep

@perlpunk perlpunk added this to Backlog in Release 0.2.5 May 31, 2020
@perlpunk perlpunk marked this pull request as ready for review May 31, 2020 12:52
@perlpunk perlpunk moved this from Backlog to In Progress/Review in Release 0.2.5 May 31, 2020
@perlpunk perlpunk moved this from In Progress/Review to Review in Release 0.2.5 May 31, 2020
@perlpunk perlpunk requested a review from ingydotnet May 31, 2020 13:48
@perlpunk perlpunk moved this from Review to In Progress in Release 0.2.5 May 31, 2020
@perlpunk perlpunk changed the title Add -h and --flow (on|off|keep) to run-parser-test-suite Add -h and --flow (on|off|keep) to run-*-test-suite May 31, 2020
@perlpunk perlpunk moved this from In Progress to Review in Release 0.2.5 May 31, 2020
Copy link
Member

@ingydotnet ingydotnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to document all this in a tests/ReadMe.md file.

With `--flow (keep|on)` run-parser-test-suite will output:

    +MAP {}
    +SEQ []

run-emitter-test-suite will then emit flow style collections if requested:

    echo 'foo: [bar, {x: y}]' | ./tests/run-parser-test-suite | ./tests/run-emitter-test-suite
    echo 'foo: [bar, {x: y}]' | ./tests/run-parser-test-suite \
        --flow keep | ./tests/run-emitter-test-suite --flow keep

Also: add that yaml_private.h include again that I had thrown out. Needed
for printing directives.
Wonder if there is a way to create a directive without using the private api.
Copy link
Member

@ingydotnet ingydotnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reformatted the markdown a bit and fixed a typo s/floe/flow

@perlpunk perlpunk merged commit cf53b3b into master May 31, 2020
@perlpunk perlpunk moved this from Review to Merged to master in Release 0.2.5 May 31, 2020
@perlpunk perlpunk deleted the perlpunk/keepflow branch May 31, 2020 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release 0.2.5
  
Merged to master
Development

Successfully merging this pull request may close these issues.

None yet

2 participants