in reply to Re^3: Listing out the characters included in a character class [wide character warning]
in thread Listing out the characters included in a character class

I am no longer using use Test::More;. I discovered that it was the source of all of my errors

Perl testing is based on the Test Anything Protocol, which is also used to test languages other than Perl ... so there is no requirement for your module to use Test::More.

That said, it would be nice if you could provide us with a SSCCE that clearly illustrates the problems you were experiencing with Test::More.

See also: hippo's excellent Basic Testing Tutorial

👁️🍾👍🦟
  • Comment on Re^4: Listing out the characters included in a character class [wide character warning]
  • Download Code

Replies are listed 'Best First'.
Re^5: Listing out the characters included in a character class [wide character warning]
by Polyglot (Chaplain) on Nov 03, 2023 at 07:24 UTC
    Unfortunately, I do not think it is possible to provide a correct SSCCE here for this case. The forum converts all of the characters which are related to the problem to HTML-entities, and I am unaware of a method by which the actual files could be attached.

    Suffice it for now that the issue is caused by UTF8 embedded in the code and tested by the Test::More tests. Without a way to paste in actual code containing UTF8 characters, unmangled, I see no point in going to the trouble of forming up an SSCCE for this case. I doubt it would be likely to exhibit the same behaviors, post-transfer/conversion, and would thus prove little.

    Blessings,

    ~Polyglot~

      The forum converts all of the characters which are related to the problem to HTML-entities, and I am unaware of a method by which the actual files could be attached.

      I think you mean, "if I use a <code> block, the forum converts all of the characters to HTML-entities. But if I use a <pre> block, it handles them correctly."

      paragraph: โมดูลนี้เป็นส่วนเสริมคำจำกัดความคลาสอักขระ

      pre: โมดูลนี้เป็นส่วนเสริมคำจำกัดความคลาสอักขระ
      code: &#3650;&#3617;&#3604;&#3641;&#3621;&#3609;&#3637;&#3657; &#3648;&#3611;&#3655;&#3609;&#3626;&#3656;&#3623; &#3609;&#3648;&#3626;&#3619;&#3636;&#3617; &#3588;&#3635;&#3592;&#3635;&#3585;&#3633;&#3604;&#3588; &#3623;&#3634;&#3617;&#3588;&#3621; &#3634;&#3626;&#3629;&#3633;&#3585;&#3586;&#3619;&#3632;

      In fact, kcott already explained the <pre> vs <code> and you even made use of it in one of your earlier posts (which is where, btw, I grabbed my test string from). Thus, I'm not sure why you're now backpedaling and claiming that you cannot figure out how to share code that includes Unicode characters in the source or output: just use the <pre> like you did earlier.

        You may have missed seeing that I have used the <pre> tags in some posts here. Unfortunately, one cannot drop code into <pre> ... </pre> tags any better than the <code> tags. In fact, the <pre> tags require more intrusive code adjustments yet--all of the HTML tags have to be converted to HTML-entities or they will simply become tags used for the post itself. In other words, either way involves HTML-entities. Try out the feature and you will see that this is so.

        Blessings,

        ~Polyglot~