What is The Turkey Test?

后端 未结 6 2008
庸人自扰
庸人自扰 2020-11-28 22:28

I came across the word \'The Turkey Test\' while learning about code testing. I don\'t know really what it means.

What is Turkey Test? Why is it called so?

6条回答
  •  一向
    一向 (楼主)
    2020-11-28 23:18

    Here is described the turkey test

    Forget about Turkey, this won't even pass in the USA. You need a case insensitive compare. So you try:

    String.Compare(string,string,bool ignoreCase):
    

    ....

    Do any of these pass "The Turkey Test?"

    Not a chance!

    Reason: You've been hit with the "Turkish I" problem.

    As discussed by lots and lots of people, the "I" in Turkish behaves differently than in most languages. Per the Unicode standard, our lowercase "i" becomes "İ" (U+0130 "Latin Capital Letter I With Dot Above") when it moves to uppercase. Similarly, our uppercase "I" becomes "ı" (U+0131 "Latin Small Letter Dotless I") when it moves to lowercase.

提交回复
热议问题