#2528 tests use identity encoding

obsolete: 8.6a4
closed-fixed
Don Porter
5
2009-02-09
2008-10-24
Don Porter
No

A few tests in unixSelect.test
make use of the "identity"
encoding.

Test winClipboard-1.5 uses the
command [tcltest::bytestring]
which is based on the "identity"
encoding.

These tests are old. Hoping there's
someone who can comment on what
they're meant to test. Furthermore
whether the same testing objective
can be met using some part of Tcl
that we actually want to keep around. :)

Discussion

1 2 > >> (Page 1 of 2)
  • Don Porter
    Don Porter
    2008-10-24

    winClipboard-1.5 appears to use
    [bytestring] just to produce
    something to compare with the
    result of [testclipboard]. A
    revised [testclipboard] command
    should be sufficient to squelch
    that one.

     
  • Don Porter
    Don Porter
    2008-10-24

    • assigned_to: hobbs --> jenglish
     
  • Don Porter
    Don Porter
    2008-10-24

    The unixSelect tests appears
    to be checking that bytes
    which are not valid UTF-8 can
    be sent through the [selection]
    mechanism without getting distorted.
    These tests rely on the implementation
    detail that [entry] widgets still
    manage their contents as char arrays
    and not Tcl_Obj's. If that assumption
    becomes false, there will need to be
    a specialized testing command, it it
    remains important to test this.

    Something else appears noteworthy
    about these tests. I've believed that
    [encoding convert* identity] was the
    last remaining script level way to get
    invalid UTF-8 into the objPtr->bytes
    of some Tcl value. These tests appears
    to show that [selection get] can also
    produce such a thing. That's also a
    bug according to modern standards.

     
  • Don Porter
    Don Porter
    2008-10-28

     
    Attachments
  • Don Porter
    Don Porter
    2008-10-28

    Patch revises [testclipboard] command
    on Windows so that it now directly tests
    the internal routine TkSelGetSelection(),
    which handles encoding details. Besides
    being a better test of code that's actually
    part of Tk, this also means the test suite
    no longer has to deal with invalid UTF-8
    strings and can drop use of the ugly
    [tcltest::bytestring] command.
    File Added: 2191960.patch

     
  • Don Porter
    Don Porter
    2008-10-28

    patch committed to HEAD so it
    can be tested on Windows.

     
  • Don Porter
    Don Porter
    2009-01-12

    Should be tested by now.

     
  • Don Porter
    Don Porter
    2009-01-12

    • status: open --> pending-fixed
     
  • Don Porter
    Don Porter
    2009-02-09

    I'd have expected this to auto-close
    by now. Is that feature not active
    in the Tk tracker?

     
  • Don Porter
    Don Porter
    2009-02-09

    • status: pending-fixed --> open-fixed
     
1 2 > >> (Page 1 of 2)