Compare commits

...

4 Commits

Author SHA1 Message Date
Vincent Torri 97845c1ee3 Eina value test: disable 64 bits value test on Windows
On Windows, a long is always a 4 bytes type. So the test is
meaningless on Windows
2024-01-17 02:29:18 +01:00
Vincent Torri 7e839be3ab Eina test: remove POSIX path from sanitize test
The POSIX path "/home/mydir/../myfile" can't be tested on Windows.
In MSYS2, /home is replaced with the installation path os MSYS2,
that is something like C:\foo\bar (depending on the value of the
path given with the MSYS2 installer). So this can't be tested with
the value "/home/myfile".
2024-01-17 02:20:47 +01:00
Ross Vandegrift 12124b770b fix vieet bashism
vieet declares /bin/sh, but read without a variable doesn't work on posix sh.
2024-01-16 01:20:32 -08:00
Ross Vandegrift 35e486dbb5 support linking with system libunibreak 2024-01-13 21:35:57 -08:00
5 changed files with 54 additions and 32 deletions

View File

@ -388,3 +388,9 @@ option('docs',
value: false,
description: 'Enable building C of documentation (Requires doxygen)'
)
option('embedded-libunibreak',
type : 'boolean',
value : true,
description : 'Use the embedded in-tree libunibreak instead of the system libunibreak.'
)

View File

@ -68,7 +68,7 @@ do
if [ $? -ne 0 ]; then
echo "Failed compiling eet file."
echo "Press 'Return' to reopen the editor, or ^C to abort."
read
read _dummy
else
DONE=1
fi

View File

@ -1,32 +1,35 @@
if (get_option('embedded-libunibreak'))
libunibreak_src = [
'unibreakbase.h',
'unibreakdef.h',
'linebreak.h',
'linebreakdef.h',
'wordbreakdef.h',
'wordbreak.h',
'unibreakbase.c',
'unibreakdef.c',
'linebreak.c',
'linebreakdata.c',
'linebreakdef.c',
'wordbreak.c',
'graphemebreak.c',
'graphemebreak.h',
'graphemebreakdef.h',
'emojidef.h',
'emojidef.c',
]
libunibreak_src = [
'unibreakbase.h',
'unibreakdef.h',
'linebreak.h',
'linebreakdef.h',
'wordbreakdef.h',
'wordbreak.h',
'unibreakbase.c',
'unibreakdef.c',
'linebreak.c',
'linebreakdata.c',
'linebreakdef.c',
'wordbreak.c',
'graphemebreak.c',
'graphemebreak.h',
'graphemebreakdef.h',
'emojidef.h',
'emojidef.c',
]
libunibreak_lib = static_library('libunibreak',
libunibreak_src,
include_directories : config_dir,
install: false,
)
libunibreak_lib = static_library('libunibreak',
libunibreak_src,
include_directories : config_dir,
install: false,
)
libunibreak = declare_dependency(
include_directories: [include_directories('.')],
link_with: libunibreak_lib,
dependencies: [eina],
)
libunibreak = declare_dependency(
include_directories: [include_directories('.')],
link_with: libunibreak_lib,
dependencies: [eina],
)
else
libunibreak = dependency('libunibreak', version : '>=4.2')
endif

View File

@ -551,8 +551,9 @@ static const struct {
{ "C:\\home\\mydir\\..\\myfile", "C:/home/myfile" },
{ "C:/home/mydir/../myfile", "C:/home/myfile" },
{ "\\home\\mydir\\..\\myfile", "/home/myfile" },
#endif
#else
{ "/home/mydir/../myfile", "/home/myfile" }
#endif
};
EFL_START_TEST(eina_test_file_path)

View File

@ -93,6 +93,11 @@ EFL_START_TEST(eina_value_test_simple)
fail_unless(l == 0xb33f);
eina_value_flush(value);
/*
* On Windows, long is always a 4 bytes type, so this check
* will never work on Windows.
*/
#ifndef _WIN32
fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_INT64));
fail_unless(eina_value_set(value, 0x0011223344556677));
fail_unless(eina_value_get(value, &i64));
@ -103,6 +108,7 @@ EFL_START_TEST(eina_value_test_simple)
fail_unless(l == (long)0x0011223344556677);
fail_unless(i64 == 0x0011223344556677);
eina_value_flush(value);
#endif
/* unsigned: */
@ -150,6 +156,11 @@ EFL_START_TEST(eina_value_test_simple)
fail_unless(ul == 3000000001UL);
eina_value_flush(value);
/*
* On Windows, long is always a 4 bytes type, so this check
* will never work on Windows.
*/
#ifndef _WIN32
fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_UINT64));
fail_unless(eina_value_set(value, 0x1122334455667788));
fail_unless(eina_value_get(value, &u64));
@ -160,6 +171,7 @@ EFL_START_TEST(eina_value_test_simple)
fail_unless(ul == (unsigned long)0x1122334455667788);
fail_unless(u64 == 0x1122334455667788);
eina_value_flush(value);
#endif
/* floating point */
fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_FLOAT));