jpbro / VbPcre2

PCRE2 Wrapper for VB6
Other
14 stars 16 forks source link

Create Tests Front-end #5

Open jpbro opened 7 years ago

jpbro commented 7 years ago

This is mostly a note to self - I'd like to create a front-end UI with a bunch of tests that can be run and possibly compared to VBScript Regex results - ideally we'd have a single method that can take either a VBScript Regex object or a CPcre object and run the exactly same regex matches/substitutions and compare the results, alerting the user of any differences.

jpbro commented 7 years ago

Started work on this in last commit. There are currently 2 RichTextBox "panes" - one on the left, one on the right.

The left-hand pane shows results from a test as carried out by VbPcre2. The right-hand pane shows results from a test as carried out by VBScript Regexp.

Once both tests are complete, a MsgBox will appear to tell you whether or not the results are identical.

dragokas commented 7 years ago

Looks nice. But, I think, it will be useful to append your form with a manual testing (also, devided on 2 result windows): like online regexp forms: you can enter there your own string, regexp press "Run" and see a result (and compare differences, if there are any). ... Do not forget to provide msgbox (or red line) if something wrong (error handling) = bad regexp or any.

jpbro commented 7 years ago

Sorry, must have accidentally closed this - reopened now. Good idea re: support for manual/user-defined regex testing @dragokas. I will add this as soon as possible.

dragokas commented 7 years ago

If you prefer, I could add a face for your wrapper the same as mine: VbPcre2 (after I have enough time to do this)

jpbro commented 7 years ago

Your interface looks great, and it definitely makes sense to reuse it here if that works for you!

I think we should wait until I move all the PCRE classes out into their own ActiveX DLL project though. Then there will be a separation of UI and PCRE/regex code (making it easier for people who just want the regex stuff and not the UI to grab what they need)

dragokas commented 7 years ago

Good idea. And simultaneously, graphic interface will be a good example how to call methods via ActiveX object of your dll.