From: Clune, T. L. (GSFC-6101) <tho...@na...> - 2016-08-18 12:52:43
|
> On Aug 18, 2016, at 7:38 AM, marco restelli <mre...@gm...> wrote: > > 2016-08-17 16:58 GMT+0200, Clune, Thomas L. (GSFC-6101) > <tho...@na...>: >> Marco, >> >> OK - I’ll take another look at the string length issue. Ultimately, if two >> long strings differ, then the resulting message will itself be long. Which >> puts us right back in the need to have allocatable string components for >> exception messages. >> >> The alternative would be to compress the string difference message when the >> strings are long. Instead of showing the entire strings we could put in >> “…”. Might be useful even for somewhat shorter strings? > > Interesting idea! > > One thing that I was wandering, somehow connected to this, is whether > it would be possible to include some regular expression capability in > the string comparison. Have you already considered such a possibility, > and maybe given a thought to pros and cons of various options, such as > using an external library (python?) or reimplementing it in fortran? I definitely plan some sort of regexp capability for selecting subsets of the tests. Did you have a different use case in mind? E.g., some sort of assert that matches a regexp instead of a strict string? Hopefully someone out there already has a Fortran regexp facility that is license compatible. I’ve not looked into it that far yet. I do not want to have an external run-time dependency on python. There can be environments where that is problematic. Cheers, - Tom > > Marco |