bdelacretaz commented on pull request #9:
URL: 
https://github.com/apache/sling-org-apache-sling-repoinit-parser/pull/9#issuecomment-808073009


   Hi @anchela , I don't know why you're not seeing my comment, here's a 
screenshot, let me know if you understand why it's not visible to you, maybe I 
did something wrong?
   
   
![my-comment](https://user-images.githubusercontent.com/81101/112611617-591a7000-8e1e-11eb-815e-b2fde72f5c73.jpg)
   
   The scenario that I'm suggesting to test this "reconstruction of repoinit 
statements":
   
   * Start with one of the existing test cases as currently done in 
`AsRepoInitTest`
   * Parse the input script E
   * Walk the list of `Operation` returned and reconstruct a script A using 
`asRepoInitString()`
   * Compare E and A a Strings
   
   As is, the comparison will probably fail due to A not including comments and 
maybe whitespace differences.
   
   Normalizing both E and A by removing comments and fixing whitespace should 
allow for comparing them?
   
   I think that's the only way to reliably test this, my `topline` patch above 
shows that currently some wrong `asRepoInitString()` implementations won't 
cause the tests to fail.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to