cynara icon indicating copy to clipboard operation
cynara copied to clipboard

cynara-tests should not depend on en_US.UTF8

Open pohly opened this issue 10 years ago • 3 comments

With the following change I get parser.getKeyAndValue to pass also on a system which has no en_US.UTF8 locale: sed -i -e 's/std::locale("en_US.UTF8")/std::locale("C")/g' ${S}/test/credsCommons/parser/Parser.cpp

As far as I can see at a glance, the test does not really depend on the en_US.UTF-8 locale (strings all plain ASCII?!), so this shouldn't change anything.

pohly avatar May 29 '15 12:05 pohly

Yes, you are right - these are just ASCII strings. Creating UTF-8 locale object is an overkill. However, I suggest to use std::locale::classic() function instead of std::locale("C").

JacquesBurac avatar May 29 '15 15:05 JacquesBurac

I've tried std::locale::classic() and that also works. I suggest that you just go ahead and commit a change created with sed. There's not much value in preparing a full patch.

pohly avatar Jun 02 '15 10:06 pohly

Fix pushed to: https://review.tizen.org/gerrit/#/c/41355

JacquesBurac avatar Jun 12 '15 15:06 JacquesBurac