cbm: Don't check language past free
Fixes: 3559f606d ("cbm-part: Fix parsing of language encodings")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
committed by
Dan Williams
parent
061bc1ff2d
commit
c89266facb
@@ -199,8 +199,8 @@ test_cbm_nl_2023 (void)
|
||||
g_assert_cmpuint (mm_cbm_part_get_part_num (part), ==, 1);
|
||||
g_assert_cmpstr (mm_cbm_part_get_text (part), ==,
|
||||
"NL-Alert 04-12-2023 12:00: TESTBERICHT. De overheid waarschuwt je tijdens noodsituaties via N");
|
||||
g_assert_cmpstr (mm_cbm_part_get_language (part), ==, "nl");
|
||||
mm_cbm_part_free (part);
|
||||
g_assert_null (mm_cbm_part_get_language (part));
|
||||
|
||||
parse_cbm ("\r\n+CBM: 88\r\n46A011130523CC56905D96D35D206519C42E97E7741039EC06DDC37490BA0C6ABFCB7410F95D7683CA6ED03D1C9683D46550BB5C9683D26EF35BDE0ED3D365D03AEC06D9D36E72D9ED02A9542A10B538A5829AC5E9347804\r\n", &part);
|
||||
serial = mm_cbm_part_get_serial (part);
|
||||
@@ -214,8 +214,8 @@ test_cbm_nl_2023 (void)
|
||||
g_assert_cmpuint (mm_cbm_part_get_part_num (part), ==, 2);
|
||||
g_assert_cmpstr (mm_cbm_part_get_text (part), ==,
|
||||
"L-Alert. Je leest dan wat je moet doen en waar je meer informatie kan vinden. *** TEST MESSAG");
|
||||
g_assert_cmpstr (mm_cbm_part_get_language (part), ==, "nl");
|
||||
mm_cbm_part_free (part);
|
||||
g_assert_null (mm_cbm_part_get_language (part));
|
||||
|
||||
parse_cbm ("\r\n+CBM: 65\r\n46A0111305334590B34C4797E5ECB09B3C071DDFF6B2DCDD2EBBE920685DCC4E8F41D7B0DC9D769F41D3FC9C5E6EBB40CE37283CA6A7DF6E90BC1CAFA7E565B2AB\r\n", &part);
|
||||
serial = mm_cbm_part_get_serial (part);
|
||||
@@ -229,8 +229,8 @@ test_cbm_nl_2023 (void)
|
||||
g_assert_cmpuint (mm_cbm_part_get_part_num (part), ==, 3);
|
||||
g_assert_cmpstr (mm_cbm_part_get_text (part), ==,
|
||||
"E Netherlands Government Public Warning System. No action required." );
|
||||
g_assert_cmpstr (mm_cbm_part_get_language (part), ==, "nl");
|
||||
mm_cbm_part_free (part);
|
||||
g_assert_null (mm_cbm_part_get_language (part));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user