Fossil

Artifact [0f44c02014]
Login

Artifact 0f44c020140c910c07915c0627be6f1ba78bdb32:


#
# Copyright (c) 2013 D. Richard Hipp
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the Simplified BSD License (also
# known as the "2-Clause License" or "FreeBSD License".)
#
# This program is distributed in the hope that it will be useful,
# but without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose.
#
# Author contact information:
#   drh@hwaci.com
#   http://www.hwaci.com/drh/
#
############################################################################
#
# Test glob pattern parsing
#

proc looks-like {testname args} {
  set i 1
  foreach {file result} $args {
    fossil test-looks-like-utf $::testdir/$file
    test looks-like-$testname.$i {$::RESULT eq $result}
    incr i
  }
}

looks-like 100 utf16-binary.txt "File \"$testdir/utf16-binary.txt\" has 3 bytes.
Starts with UTF-8 BOM: no
Starts with UTF-16 BOM: no
Looks like UTF-8: no
Has flag LOOK_NUL: yes
Has flag LOOK_CR: no
Has flag LOOK_LF: no
Has flag LOOK_CRLF: no
Has flag LOOK_LENGTH: no"