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 marked this pull request as ready for review May 31, 2020 12:52
@perlpunk perlpunk force-pushed the perlpunk/keepflow branch from 7d21819 to 8f3dffb Compare May 31, 2020 13:44
@perlpunk perlpunk requested a review from ingydotnet May 31, 2020 13:48
@perlpunk perlpunk force-pushed the perlpunk/keepflow branch from 8f3dffb to 149d738 Compare May 31, 2020 14:07
@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
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.

@perlpunk perlpunk force-pushed the perlpunk/keepflow branch from 149d738 to 22ec689 Compare May 31, 2020 22:23
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.
@perlpunk perlpunk force-pushed the perlpunk/keepflow branch from e3da7da to 15fe0fb Compare May 31, 2020 22:39
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 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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants