2020-01-02 16:12:51 +01:00
|
|
|
#include "test.h"
|
|
|
|
#include "transcript.h"
|
|
|
|
#include "../transcription.h"
|
|
|
|
|
2020-01-07 13:18:54 +01:00
|
|
|
static void test_transcript(const char *devanagari, const char *latin)
|
2020-01-02 16:12:51 +01:00
|
|
|
{
|
2020-01-07 13:18:54 +01:00
|
|
|
char *czech = transcript_devanagari_to_czech(devanagari);
|
|
|
|
ck_assert_str_eq(latin, czech);
|
2020-01-02 16:12:51 +01:00
|
|
|
free(czech);
|
2020-01-07 13:18:54 +01:00
|
|
|
}
|
2020-01-02 16:12:51 +01:00
|
|
|
|
2020-01-07 13:18:54 +01:00
|
|
|
START_TEST(test_transcript_devanagari_to_czech)
|
|
|
|
{
|
|
|
|
test_transcript("तन्त्रशास्त्रम्", "tantrašástra");
|
2020-01-02 16:12:51 +01:00
|
|
|
|
2020-01-07 13:18:54 +01:00
|
|
|
test_transcript("सांख्य", "sánkhja");
|
2020-01-02 16:12:51 +01:00
|
|
|
|
2020-01-07 13:18:54 +01:00
|
|
|
test_transcript("महाभारतम्", "mahábhárata");
|
2020-01-02 16:12:51 +01:00
|
|
|
|
2020-01-07 13:18:54 +01:00
|
|
|
test_transcript("योगः", "jóga");
|
|
|
|
|
|
|
|
test_transcript("भगवद्गीता", "bhagavadgíta");
|
2020-01-02 16:12:51 +01:00
|
|
|
}
|
|
|
|
END_TEST
|
|
|
|
|
|
|
|
void register_transcript_tests(TCase *test_case)
|
|
|
|
{
|
|
|
|
tcase_add_test(test_case, test_transcript_devanagari_to_czech);
|
|
|
|
}
|