Commit 6ade17c5 authored by Alois Spitzbart's avatar Alois Spitzbart
Browse files

Remove double entries and correct indian-

national calendar

BUG: 441275
parent c584c3ae
:
: test holiday file.
:
: Metadata Section
: Country Code for file if for a country, blank otherwise
country ""
: Language Code for language holiday names are in, optional
language ""
: Short name for holiday file to override region name for display to users, optional
name "Multiple Calendar Systems"
: Description for holiday file for display to users, optional
description "A test file for multiple calendar systems"
: Holiday List Section
"New Years Day00" public on 1/1
"New Years Day01" public on 1/1
"Bangla New Year" public cultural indiannational vaishakh 1
......@@ -64,6 +64,20 @@ void HolidayRegionTest::parseRegionDate(const KHolidays::HolidayRegion &region,
qDebug() << "";
}
void HolidayRegionTest::testLoadFileCalendarSystems()
{
KHolidays::HolidayRegion region(QFileInfo(KDESRCDIR "/holiday_calendar_systems"));
printMetadata(region);
parseRegionCalendarYear(region, 2020, QStringLiteral("gregorian"));
parseRegionCalendarYear(region, 2020);
parseRegionCalendarYear(region, 2021);
parseRegionCalendarYear(region, 2022);
parseRegionCalendarYear(region, 2023);
parseRegionCalendarYear(region, 2024);
parseRegionCalendarYear(region, 2025);
qDebug() << "";
}
void HolidayRegionTest::testLoadFile()
{
KHolidays::HolidayRegion region(QFileInfo(KDESRCDIR "/holiday_gb-eaw_en-gb_Test"));
......
......@@ -20,6 +20,7 @@ class HolidayRegionTest : public QObject
{
Q_OBJECT
private Q_SLOTS:
void testLoadFileCalendarSystems();
void testLoadFile();
void testGb();
void testIran();
......
......@@ -2436,7 +2436,7 @@ YY_DECL {
case 161:
YY_RULE_SETUP
#line 275 "holidayscannerplan.lpp"
{ yylval->sval = (char *)"indian-national"; return token::CALENDAR; }
{ yylval->sval = (char *)"indiannational"; return token::CALENDAR; }
YY_BREAK
case 162:
YY_RULE_SETUP
......
......@@ -260,7 +260,7 @@ yaumaljumma { yylval->ival = 5; return token::WDAY; }
yaumalsabt { yylval->ival = 6; return token::WDAY; }
yaumalahad { yylval->ival = 7; return token::WDAY; }
indiannational { yylval->sval = (char *)"indian-national"; return token::CALENDAR; }
indiannational { yylval->sval = (char *)"indiannational"; return token::CALENDAR; }
chaitra { yylval->ival = 1; return token::MONTH; }
vaishakh { yylval->ival = 2; return token::MONTH; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment