NetworkManager/libnm-core/tests
Thomas Haller 1525b44714 utils: support unknown numeric values in nm_utils_enum_to_str() and nm_utils_enum_from_str()
- for nm_utils_enum_to_str(), whenever encounter a numeric value
  that has no expression as enum/flag, encode the value numerically.
  For enums, encode it as decimal. For flags, encode it as hexadecimal
  (with 0x prefix).
  Also check that an existing value_nick cannot be wrongly interpreted
  as a integer, and if they would, encode them instead as integers only.

- Likewise, in nm_utils_enum_from_str() accept numerical values
  and for nm_utils_enum_get_values() return enum nicks that look
  like numeric values in their numeric form only.

- In nm_utils_enum_from_str(), don't use g_strsplit(), but clone the
  string only once and manipulate it inplace.

- Accept '\n' and '\r' as additional delimiters for flags.

- For consistency, also return an err_token for enum types. If the caller
  doesn't care about that, he should simply not pass the out-argument.
2017-02-20 13:45:32 +01:00
..
certs keyfile: support writing certificates as blob inside the keyfile 2015-03-12 18:16:58 +01:00
test-compare.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-crypto.c crypto: don't try to decrypt PKCS#8 key if no password is supplied 2016-09-23 18:05:54 +02:00
test-general-enums.h utils: support unknown numeric values in nm_utils_enum_to_str() and nm_utils_enum_from_str() 2017-02-20 13:45:32 +01:00
test-general.c utils: support unknown numeric values in nm_utils_enum_to_str() and nm_utils_enum_from_str() 2017-02-20 13:45:32 +01:00
test-keyfile.c libnm/proxy: add proxy setting for non-slave connection during normalization 2016-10-05 14:53:21 +02:00
test-secrets.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-setting-8021x.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-setting-bond.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-setting-dcb.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00
test-settings-defaults.c shared: move shared files to subdirectory "shared/nm-utils/" 2016-06-16 10:45:53 +02:00