1. Field of the Invention
The invention relates to a table, more particularly to a variable-length table which requires a minimum packaging volume to minimize transport costs.
2. Description of the Related Art
Referring to FIGS. 1 and 2, a conventional variable-length table is shown to comprise a leg assembly 1 and a tabletop assembly 2. The leg assembly 1 includes two upright leg units 11. Each leg unit 11 includes two leg posts 110. The tabletop assembly 2 includes two leg mounting boards 20, two guide beams 21, two connecting beam sets, two fixed tabletop units 23 and a removable tabletop unit 24.
Each leg mounting board 20 is mounted on one of the leg units 11 such that the leg posts 110 of the corresponding leg unit 11 are connected to a bottom surface of two end portions of the leg mounting board 20. Each guide beam 21 is mounted to a top surface of one of the end portions of each of the leg mounting boards 20. The guide beams 21 are transverse to the leg mounting boards 20 and are parallel to each other. A pinion 210 is mounted on a top surface of an intermediate portion of each guide beam 21. The connecting beams 22 of each connecting beam set are disposed respectively on two sides of a corresponding one of the guide beams 21 and are mounted slidably thereto. The connecting beams 22 in each of the connecting beam sets are provided with a respective rack 220 that meshes with the pinion 210 on the corresponding one of the guide beams 21. Each of the fixed tabletop units 23 includes a semi-circular board member 231 with a bottom surface mounted on a respective one of the connecting beams 22 of each of the connecting beam sets. The racks 220 on the connecting beams 22 and the pinions 210 on the guide beams 21 ensure simultaneous lateral movement of the connecting beams 22 of the connecting beam sets when the fixed tabletop units 23 are pushed toward each other to obtain a shorter table length or are pulled apart to obtain a longer table length. The removable tabletop unit 24 includes a rectangular board member 241 that is to be disposed removably between the fixed tabletop units 23 when the fixed tabletop units 23 are pulled apart so as to obtain the longer table length. A locking unit 25 is provided on the bottom surfaces of the fixed and removable tabletop units 23, 24 to secure the removable tabletop unit 24 to the fixed tabletop units 23 when the longer table length is obtained (see FIG. 2).
Referring to FIGS. 1 and 2, each of the fixed tabletop units 23 further has a curved flange 230 that extends downwardly from the board member 231 for concealing the guide beams 21 and the connecting beams 22 of the connecting beam sets so as to enhance appearance of the table when the shorter table length is obtained. The removable tabletop unit 24 further has an opposite pair of flanges 240 that are mounted fixedly on and that extend downwardly from the board member 241. The flanges 240 cooperate with the flanges 230 of the fixed tabletop units 23 so as to conceal the guide beams 21 and the connecting beams 22 of the connecting beam sets when the longer table length is obtained.
As mentioned beforehand, the removable tabletop unit 24 is removed, and the fixed tabletop units 23 are pushed toward each other to obtain the shorter table length. Albeit a space (T) is formed between the top surface of the leg mounting boards 20 and the bottom surface of the board members 231 of the fixed tabletop units 23, the removable tabletop unit 24 cannot be concealed in the space (T) because the sum of the height of the flanges 240 and the thickness of the board member 241 is greater than the depth (t) of the space (T), thereby arising in a storage problem for the removable tabletop unit 24 when the shorter table length is in use.
As shown in FIG. 3, the conventional variable-length table is usually dismantled during transport to reduce the space occupied thereby. The fixed tabletop units 23 are pushed toward one another to obtain the shorter table length, the removable tabletop unit 24 is disposed on top of the fixed tabletop units 23, and the leg posts 110 are detached from the tabletop assembly 2 and are disposed in a U-shaped space that is confined by the removable tabletop unit 24. If the removable tabletop unit 24 can be concealed within the space (T), the packaging volume of the conventional variable-length table will be further reduced to result in lower transport costs.
It is noted that the height of the flanges 230, 240 may be reduced so that the sum of the height of the flanges 240 and the thickness of the board member 24 is less than or equal to the depth (t) of the space (T) in order to permit concealing of the removable tabletop unit 24 in the space (T). However, doing so would adversely affect the appearance of the table since the flanges 230, 240 will be incapable of concealing fully the guide beams 21 and the connecting beams 22 of the connecting beam sets. Alternatively, the depth (t) of the space (T) may be increased so that the removable tabletop unit 24 can be concealed in the latter. The appearance of the table is not adversely affected since the flanges 230, 240 still conceal fully the guide beams 21 and the connecting beams 22.


Industrial Sweepers For Warehouse Cleaning

Storage facilities and warehouses should always be clean so that goods remain safe. In order to maintain cleanliness in the area, owners should invest in the right cleaning equipment. Industrial sweepers can make cleanliness possible.
ndustrial sweepers are great for large areas like warehouses. With these quality cleaning machines, business owners can ensure that they can always get the cleanliness they expect. There are many reasons why every business should have this kind of equipment available in their warehouse. One reason is that industrial sweepers comes in a variety of sizes and models to suit various cleaning situations. No matter how big or small the area is, there are always suitable models available. Among the most popular models on the market today, are ride-on and walk-behind sweepers.
Ride-On Sweepers
Ride-on sweepers are ideal for large indoor and outdoor cleaning needs. These are the best tools to use for factories and warehouses. They are very user-friendly as they are designed to provide comfort for operators and save them from injuries and strain. Most models have adjustable seats, and they produce minimal noise.
Ride-on sweepers come with many special functions that allow operators to finish sweeping jobs quickly and easily. Since they can ride on these models, they can work for longer periods of time. They can also finish more work in a shorter amount of time.
The newest ride-on sweepers can utilize three different cleaning functions at the same time. They can sweep, scrub and dry floors. They are also compact and highly durable. Ride-on sweepers can clean a variety of surfaces and can reach even the narrowest areas. They are powered by either battery or gasoline.
Walk-Behind Sweepers
Walk-behind sweepers have the capacity to reach difficult to clean areas. They are portable, and they can be used on any kind of floors. They can even be used on carpets. They have adjustable and easy to manoeuver brooms. These machines never leave dirt behind because their brooms are very flexible. This technology allows operators to tackle the harshest floor and surface conditions.
Walk-behind sweepers produce very minimal noise and do not emit any smells or fumes. These units are designed to effectively filter dust to ensure that warehouses are safe and healthy places to work and store goods. This equipment guarantees excellent cleaning without spots and marks. It can endure daily industrial and commercial cleaning use. These walk-behind cleaners may be run using gas or batteries. Regardless of the power source, this equipment can handle both indoor and outdoor cleaning jobs. Walk-behind machines are very efficient. Just like ride-on units, some models can sweep, scrub and dry at the same time.
Ride-on and walk-behind sweepers provide countless benefits for warehouse owners. They can provide ease and comfort for operators and excellent cleaning results. Their numerous features include efficient filters, high-capacity motors and flexibility to make them a perfect choice for warehouses and factories.


Thea The Awakening - Launch Trailer!

Thea: The Awakening is a survival game set in a Fantasy world full of mystical creatures from Slavic Mythology. The player discovers the awakening of the world after the great darkness that lasted hundreds of years. In a turn-based strategic gameplay, as one of the Slavic gods, the player takes control over a small group of his believers and tries to bring some light and hope to the world of Thea.


HUGO BOSS Orange jackets always sell well around the year, with lightweight jackets and windbreakers seeing their success in the summer, and the much thicker padded and quilted coats and gilets keeping people around the world warm in the winter. Then you have your BOSS Orange all year round classics such as the leather jacket offering style and quality whatever the weather, occasion or season. The HUGO BOSS summer ranges see a much thinner style of garment, offering windbreakers, bomber jackets and hooded jackets for the spring showers all proving popular, while carrying the HUGO BOSS Orange branding and obvious quality throughout. With plenty of colour, zip fronts and fold away hoods the spring summer jackets collection doesn't look out of place on the warmest of days, knowing the British weather is certainly changeable. HUGO BOSS for the winter is a completely different style with padded and quilted coats keeping people dry and warm while looking good. Recent times have seen the introduction of almost a puffa style jacket, while the hooded gilet is back and keeping in trend with the latest fashions.

HUGO BOSS not only has a global appeal as being one of the best premium designer brands available, but also has a definitive all year round ability to keep with the trends and give HUGO BOSS Orange fans what their looking for 365 days a year. Authorised stockist of HUGO BOSS clothing Mainline Menswear have an amazing range of BOSS jackets, coats and clothing that will provide seasonal outerwear for fans of the premium designer brand around the world especially in the USA and UK.


Lupus headaches in childhood-onset systemic lupus erythematosus: relationship to disease activity as measured by the systemic lupus erythematosus disease activity index (SLEDAI) and disease damage.
The Systemic Lupus Erythematosus Disease Activity Index (SLEDAI) is the most commonly used measure of disease activity for children with systemic lupus erythematosus (SLE). For headaches to be scored in the SLEDAI as a symptom of active disease, they have to be nonresponsive to narcotic analgesia. This may affect the overall estimation of disease activity, especially because headaches are common among children with SLE and narcotic analgesia is rarely used for headache therapy in paediatrics. Moreover, the importance of headaches for the development of damage and their relation to other clinical parameters and outcomes has not been well described for children with SLE. We reviewed the medical charts of an inception cohort of children (n = 63) who were newly diagnosed with SLE. Information on headaches and other disease parameters was obtained. Disease activity and damage were measured using the SLEDAI and the Systemic Lupus International Collaboration Clinics/American College of Rheumatology Damage Index (SDI), respectively. It has been shown that the accumulated burden of active disease as measured by serial SLEDAI scores over time is one of the best predictors of eventual damage to children with SLE. New-onset or significant increase of severe and/or persistent headaches (LHA) were reported in 43% of the patients during a mean follow-up of 3.6 years. LHA occurred preferentially among patients with elevated levels of antiphospholipid antibodies (aPL) (P < 0.02) and only 6% of all LHA episodes were treated with narcotics and thus considered for the measurement of disease activity in the SLEDAI. LHA were unrelated to proxy-measures of disease activity, such as the need to intensify therapies. When used in children, the insensitivity of the SLEDAI to capture LHA did not seem to decrease the responsiveness of the SLEDAI to detect clinically important worsening of disease, or negatively impact on its ability to predict damage.


Following this month’s launch of the original The Banner Saga, Switch version of The Banner Saga 2 will launch on June 7, publisher Versus Evil and developer Stoic Studio announced.

The Banner Saga 2 first launched for PC in April 2016, PlayStation 4 and Xbox One in July 2016, and iOS and Android in September 2016.

Here is an overview of the game, via its Steam page:


Foster, William Z.

The bankruptcy of the American labor movement

click to zoom

The Trade Union Educational League, Chicago. [1922], 62p., wraps. Labor Herald library no. 4. "An indictment of the American labor movement for refusal to engage in political activity, for tolerating reactionary and incompetent leadership, and for general 'bankruptcy.' The cause of the backwardness of American workers is found in dual unionism." *Seidman F240


Bridging the gap between point-of-care testing and laboratory testing in hemostasis.
Point-of-care (POC) testing within hemostasis is an expanding field, with the most widely used test being POC international normalized ratio (INR). Many of these devices are being used in a nonlaboratory setting by staff with no laboratory training. In the United Kingdom, external quality assessment (EQA) is provided by the organization UK National External Quality Assessment Scheme for Blood Coagulation (UK NEQAS BC). Participants within the UK NEQAS BC POC INR program are largely based in primary care (77%), with the majority of EQA samples and patients tests being performed by nurses (70%). Many of these centers do not have support from the laboratory staff and may, therefore, not understand the requirement for a robust quality control (QC) system comprising both internal quality control (IQC) and EQA. From data acquired through a questionnaire of these UK NEQAS BC users, we observed that 2% of the centers never perform IQC tests, only 29% perform IQC tests when starting a new batch of test strips, and just 15% carry out IQC with each clinic as recommended by the UK guidelines. The imprecision of EQA tests was greater for POC users than in the UK NEQAS BC hospital laboratory program, with average coefficients of variation for a 2-year period of 11.0 and 7.3%, respectively. This may reflect the handling of EQA samples rather than the imprecision of the method, due to the lack of laboratory training amongst POC staff. POC INR in the UK could greatly benefit from more interaction and support from laboratories to these POC testers.


Uncategorized PayPal on Blockchain: ‘Why Don’t We Just Use a Database?’

If something works, why change it? PayPal’s Harper Reed has dismissed “boring” Blockchain technology, choosing to stick to the traditional databases.

‘Why Don’t We Just Use a Database?’

In the midst of the “chainwashing” trend, some companies seem to be taking the high road and staying clear of Bitcoin’s underlying Blockchain technology. This is the case with PayPal which, despite its ambitions to become the dominant global online payments platform, has distanced itself from this prospect.

When asked about the potential for blockchain technology at the 4YFN conference, Harper Reed, the Director of Software Development for PayPal, dismissed it stating:

Whenever people say why don’t we use the blockchain to do this, I think why don’t we just use a database?

This is, in fact what PayPal has been doing all along with its own centralized online payments app Venmo, which is now processing nearly $20 billion USD per year and is much in vogue among millennials, in particular.

Reed went on to reference Bitcoin’s “dark market” image as the medium of exchange for the deep web economy, suggesting that the technology would benefit from a rebrand:

When I think of blockchain I think of drugs, and I’m not really a drug user so I find it really boring.

PayPal & Bitcoin

However, this comes as a relatively refreshing stance towards Blockchain, despite Reed’s misconception regarding Bitcoin being a “drug currency.”

PayPal seems to be more focused on results and on the user-experience itself, rather than on hype and the technology that works in the background, which was the key point of Harper Reed’s talk at 4YFN, the startup spin-off of Mobile World Congress in Barcelona.

Nevertheless, PayPal has had several “encounters” with blockchain technology and Bitcoin itself. In June 2016, PayPal partnered with the digital asset exchange and wallet Coinbase, allowing users to sell bitcoin and cash out to their PayPal accounts.

Peter Thiel, PayPal co-founder and close adviser to President Donald Trump, has also expressed his interest in the technology, having invested in several Bitcoin startups himself.

He once stated:

PayPal had these goals of creating a new currency. We failed at that, and we just created a new payment system. I think Bitcoin has succeeded on the level of a new currency.

Thiel is becoming an extremely important adviser for Donald Trump, who is increasingly being associated with Bitcoin supporters like 21 Inc. CEO Balaji S. Srinivasan and the recently appointed U.S. Budget Chief Mick Mulvaney, also known as “Bitcoin Congressman.”

Will PayPal retain its competitive edge in the future despite shunning blockchain technology? Share your thoughts below!

Images courtesy of Shutterstock, queerty.com, wikipedia.com


2nd Caucasus Army Corps

The 2nd Caucasian Army Corps (Russian: 2-й Кавказский армейский корпус) was a division of the military of the Russian Empire which existed from 1879 to 1918, including the time period of World War I.

Composition
51st Infantry Division

Part of
10th Army: 1914
1st Army: 1914–1915
9th Army: 1915
13th Army: 1915
10th Army: 1915–1917

Commanders
 General G. J. Berchman: 1914
 General Samad bey Mehmandarov: 1914–1917
 Lieutenant General G. I. Choglokov: 1917

References
 A. K. Zalesskij I mirowaja wojna. Prawitieli i wojennaczalniki. wyd. WECZE Moskwa 2000.

Category:Corps of the Russian Empire


Image copyright Getty Images Image caption Kaesong is a key source of revenue for Pyongyang

South Korea is to suspend operations at a jointly-run industrial park in North Korea following the North's recent rocket launch and nuclear test.

Seoul said all operations at the complex would halt, to stop the North using its investment "to fund its nuclear and missile development".

Kaesong is one of the last points of co-operation between the two Koreas and a key source of revenue for Pyongyang.

It came as Japan imposed new sanctions against the North following the launch.

They include a ban on North Korean vessels coming into port in Japan and on vessels from other countries that have visited the state,

The US warned on Tuesday that the North could soon have enough plutonium for nuclear weapons.

South Korea, the US, Japan and others see Sunday's rocket launch - ostensibly to put a satellite into space - as cover for a banned test of missile technology.

Read more:

Image copyright Getty Images Image caption In 2013, Kaesong was shut down for five months as ties between the two Koreas deteriorated

Tensions have risen over the past month since North Korea carried out a fourth nuclear test in early January.

"All our support and efforts... were taken advantage of by the North to develop its nuclear weapons and missile programmes," the South's Unification Minister Hong Yong-pyo told reporters.

The announcement came amid reports that the North's military chief, Ri Yong-gil, had been executed on corruption charges.

South Korea's state news agency Yonhap quoted unnamed sources saying the general, who was appointed in 2013, had been deemed guilty of corruption and pursuing personal gains.

There was no confirmation of the report.

Reuters news agency also reported the execution but did not identify its source or how the information had been obtained.

What is Kaesong?

Joint industrial complex located inside North Korea just across from the demilitarised zone

Launched in 2004 - it is a source of badly-needed cash for the North

124 companies operate there from industries including clothing, textiles, car parts and semiconductors

South Korean firms pay about $100m (£69m) a year in wages - about 54,000 North Koreans work there

Last shut down in April 2013 - for four months - after US-South Korean military drills angered North Korea

Read more: What is the Kaesong industrial complex?


<!DOCTYPE html>


/* -*-mode: c; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-*/
/*
** Copyright (C) 2008-2013 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
** Free Software Foundation; either version 3, or (at your option) any
** later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software Foundation,
** Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**
*/

#if HAVE_CONFIG_H
#include "config.h"
#endif /*HAVE_CONFIG_H*/

#include <glib.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>

#include <locale.h>

#include "test-mu-common.h"
#include "mu-msg.h"
#include "utils/mu-str.h"

static MuMsg*
get_msg (const char *path)
{
	GError *err;
	MuMsg *msg;

	if (g_test_verbose ())
		g_print (">> %s\n", path);

	err = NULL;
	msg = mu_msg_new_from_file (path, NULL, &err);

	if (!msg) {
		g_printerr ("failed to load %s: %s\n",
			    path, err ? err->message : "something went wrong");
		g_clear_error (&err);
		g_assert (0);
	}

	return msg;
}

static gboolean
check_contact_01 (MuMsgContact *contact, int *idx)
{
	switch (*idx) {
	case 0:
		g_assert_cmpstr (mu_msg_contact_name (contact),
				 ==, "Mickey Mouse");
		g_assert_cmpstr (mu_msg_contact_email (contact),
				 ==, "anon@example.com");
		break;
	case 1:
		g_assert_cmpstr (mu_msg_contact_name (contact),
				 ==, "Donald Duck");
		g_assert_cmpstr (mu_msg_contact_email (contact),
				 ==, "gcc-help@gcc.gnu.org");
		break;
	default:
		g_assert_not_reached ();
	}
	++(*idx);

	return TRUE;
}

static void
test_mu_msg_01 (void)
{
	MuMsg *msg;
	gint i;

	msg = get_msg (MU_TESTMAILDIR4 "/1220863042.12663_1.mindcrime!2,S");

	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "Donald Duck <gcc-help@gcc.gnu.org>");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "gcc include search order");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "Mickey Mouse <anon@example.com>");
	g_assert_cmpstr (mu_msg_get_msgid(msg),
			 ==, "3BE9E6535E3029448670913581E7A1A20D852173@"
			 "emss35m06.us.lmco.com");
	g_assert_cmpstr (mu_msg_get_header(msg, "Mailing-List"),
					 ==,
			 "contact gcc-help-help@gcc.gnu.org; run by ezmlm");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'klub' */
			  ==, MU_MSG_PRIO_NORMAL);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 1217530645);

	i = 0;
	mu_msg_contact_foreach (msg, (MuMsgContactForeachFunc)check_contact_01,
				&i);
	g_assert_cmpint (i,==,2);

	mu_msg_unref (msg);
}

static gboolean
check_contact_02 (MuMsgContact *contact, int *idx)
{
	switch (*idx) {
	case 0:
		g_assert_cmpstr (mu_msg_contact_name (contact),
				 ==, NULL);
		g_assert_cmpstr (mu_msg_contact_email (contact),
				 ==, "anon@example.com");
		break;
	case 1:
		g_assert_cmpstr (mu_msg_contact_name (contact),
				 ==, NULL);
		g_assert_cmpstr (mu_msg_contact_email (contact),
				 ==, "help-gnu-emacs@gnu.org");
		break;
	default:
		g_assert_not_reached ();
	}
	++(*idx);

	return TRUE;
}

static void
test_mu_msg_02 (void)
{
	MuMsg *msg;
	int i;

	msg = get_msg (MU_TESTMAILDIR4 "/1220863087.12663_19.mindcrime!2,S");

	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "help-gnu-emacs@gnu.org");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "Re: Learning LISP; Scheme vs elisp.");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "anon@example.com");
	g_assert_cmpstr (mu_msg_get_msgid(msg),
			 ==, "r6bpm5-6n6.ln1@news.ducksburg.com");
	g_assert_cmpstr (mu_msg_get_header(msg, "Errors-To"),
			 ==, "help-gnu-emacs-bounces+xxxx.klub=gmail.com@gnu.org");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_LOW);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 1218051515);

	i = 0;
	mu_msg_contact_foreach (msg,
				(MuMsgContactForeachFunc)check_contact_02,
				&i);
	g_assert_cmpint (i,==,2);
	g_assert_cmpuint (mu_msg_get_flags(msg), ==, MU_FLAG_SEEN|MU_FLAG_LIST);

	mu_msg_unref (msg);
}

static void
test_mu_msg_03 (void)
{
	MuMsg		*msg;
	const GSList	*params;

	msg = get_msg (MU_TESTMAILDIR4 "/1283599333.1840_11.cthulhu!2,");
	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "Bilbo Baggins <bilbo@anotherexample.com>");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "Greetings from Lothlórien");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "Frodo Baggins <frodo@example.com>");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_NORMAL);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 0);
	g_assert_cmpstr (mu_msg_get_body_text(msg, MU_MSG_OPTION_NONE),
			 ==,
			 "\nLet's write some fünkÿ text\nusing umlauts.\n\nFoo.\n");

	params = mu_msg_get_body_text_content_type_parameters(
		msg, MU_MSG_OPTION_NONE);
	g_assert_cmpuint (g_slist_length ((GSList*)params), ==, 2);

	g_assert_cmpstr ((char*)params->data,==, "charset");
	params = g_slist_next(params);
	g_assert_cmpstr ((char*)params->data,==,"UTF-8");

	g_assert_cmpuint (mu_msg_get_flags(msg),
			  ==, MU_FLAG_UNREAD); /* not seen => unread */

	mu_msg_unref (msg);
}

static void
test_mu_msg_04 (void)
{
	MuMsg *msg;

	msg = get_msg (MU_TESTMAILDIR4 "/mail5");
	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "George Custer <gac@example.com>");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "pics for you");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "Sitting Bull <sb@example.com>");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_NORMAL);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 0);
	g_assert_cmpuint (mu_msg_get_flags(msg),
			  ==, MU_FLAG_HAS_ATTACH|MU_FLAG_UNREAD);
	mu_msg_unref (msg);
}

static void
test_mu_msg_multimime (void)
{
	MuMsg *msg;

	msg = get_msg (MU_TESTMAILDIR4 "/multimime!2,FS");
	/* ie., are text parts properly concatenated? */
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "multimime");
	g_assert_cmpstr (mu_msg_get_body_text(msg, MU_MSG_OPTION_NONE),
			 ==, "abcdef");
	g_assert_cmpuint (mu_msg_get_flags(msg),
			 ==, MU_FLAG_FLAGGED | MU_FLAG_SEEN |
			 MU_FLAG_HAS_ATTACH);
	mu_msg_unref (msg);
}

static void
test_mu_msg_flags (void)
{
	unsigned u;

	struct {
		const char *path;
		MuFlags flags;
	} msgflags [] = {
		{ MU_TESTMAILDIR4 "/multimime!2,FS",
		  MU_FLAG_FLAGGED | MU_FLAG_SEEN |
		  MU_FLAG_HAS_ATTACH },
		{ MU_TESTMAILDIR4 "/special!2,Sabc",
		  MU_FLAG_SEEN }

	};

	for (u = 0; u != G_N_ELEMENTS(msgflags); ++u) {
		MuMsg *msg;
		MuFlags flags;

		g_assert ((msg = get_msg (msgflags[u].path)));
		flags = mu_msg_get_flags (msg);

		if (g_test_verbose())
			g_print ("=> %s [ %s, %u] <=> [ %s, %u]\n",
				 msgflags[u].path,
				 mu_flags_to_str_s(msgflags[u].flags,
						   MU_FLAG_TYPE_ANY),
				 (unsigned)msgflags[u].flags,
				 mu_flags_to_str_s(flags, MU_FLAG_TYPE_ANY),
				 (unsigned)flags);
		g_assert_cmpuint (flags ,==, msgflags[u].flags);
		mu_msg_unref (msg);
	}
}

static void
test_mu_msg_umlaut (void)
{
	MuMsg *msg;

	msg = get_msg (MU_TESTMAILDIR4 "/1305664394.2171_402.cthulhu!2,");
	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "Helmut Kröger <hk@testmu.xxx>");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "Motörhead");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "Mü <testmu@testmu.xx>");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_NORMAL);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 0);

	mu_msg_unref (msg);
}

static void
test_mu_msg_references (void)
{
	MuMsg *msg;
	const GSList *refs;

	msg = get_msg (MU_TESTMAILDIR4 "/1305664394.2171_402.cthulhu!2,");
	refs = mu_msg_get_references(msg);

	g_assert_cmpuint (g_slist_length ((GSList*)refs), ==, 4);

	g_assert_cmpstr ((char*)refs->data,==, "non-exist-01@msg.id");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==, "non-exist-02@msg.id");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==, "non-exist-03@msg.id");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==, "non-exist-04@msg.id");
	refs = g_slist_next (refs);

	mu_msg_unref (msg);
}

static void
test_mu_msg_references_dups (void)
{
	MuMsg		*msg;
	const GSList	*refs;
	const char	*mlist;

	msg = get_msg (MU_TESTMAILDIR4 "/1252168370_3.14675.cthulhu!2,S");
	refs = mu_msg_get_references(msg);

	/* make sure duplicate msg-ids are filtered out */

	g_assert_cmpuint (g_slist_length ((GSList*)refs), ==, 6);

	g_assert_cmpstr ((char*)refs->data,==,
			 "439C1136.90504@euler.org");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==,
			 "4399DD94.5070309@euler.org");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==,
			 "20051209233303.GA13812@gauss.org");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==,
			 "439B41ED.2080402@euler.org");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==,
			 "439A1E03.3090604@euler.org");
	refs = g_slist_next (refs);
	g_assert_cmpstr ((char*)refs->data,==,
			 "20051211184308.GB13513@gauss.org");
	refs = g_slist_next (refs);

	mlist = mu_msg_get_mailing_list (msg);
	g_assert_cmpstr (mlist ,==, "Example of List Id");

	mu_msg_unref (msg);
}

static void
test_mu_msg_references_many (void)
{
	MuMsg *msg;
	unsigned u;
	const GSList *refs, *cur;
	const char* expt_refs[] = {
		"e9065dac-13c1-4103-9e31-6974ca232a89@t15g2000prt.googlegroups.com",
		"87hbblwelr.fsf@sapphire.mobileactivedefense.com",
		"pql248-4va.ln1@wilbur.25thandClement.com",
		"ikns6r$li3$1@Iltempo.Update.UU.SE",
		"8762s0jreh.fsf@sapphire.mobileactivedefense.com",
		"ikqqp1$jv0$1@Iltempo.Update.UU.SE",
		"87hbbjc5jt.fsf@sapphire.mobileactivedefense.com",
		"ikr0na$lru$1@Iltempo.Update.UU.SE",
		"tO8cp.1228$GE6.370@news.usenetserver.com",
		"ikr6ks$nlf$1@Iltempo.Update.UU.SE",
		"8ioh48-8mu.ln1@leafnode-msgid.gclare.org.uk"
	};

	msg = get_msg (MU_TESTMAILDIR2 "/bar/cur/181736.eml");
	refs = mu_msg_get_references(msg);

	g_assert_cmpuint (G_N_ELEMENTS(expt_refs), ==,
			  g_slist_length((GSList*)refs));

	for (cur = refs, u = 0; cur; cur = g_slist_next(cur), ++u) {
		if (g_test_verbose())
			g_print ("%u. '%s' =? '%s'\n",
				 u, (char*)cur->data,
				 expt_refs[u]);

		g_assert_cmpstr ((char*)cur->data, ==, expt_refs[u]);
	}

	mu_msg_unref (msg);
}

static void
test_mu_msg_tags (void)
{
	MuMsg *msg;
	const GSList *tags;

	msg = get_msg (MU_TESTMAILDIR4 "/mail1");

	g_assert_cmpstr (mu_msg_get_to(msg),
			 ==, "Julius Caesar <jc@example.com>");
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "Fere libenter homines id quod volunt credunt");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "John Milton <jm@example.com>");
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_HIGH);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 1217530645);

	tags = mu_msg_get_tags (msg);
	g_assert_cmpstr ((char*)tags->data,==,"Paradise");
	g_assert_cmpstr ((char*)tags->next->data,==,"losT");
	g_assert_cmpstr ((char*)tags->next->next->data,==,"john");
	g_assert_cmpstr ((char*)tags->next->next->next->data,==,"milton");

	g_assert (!tags->next->next->next->next);

	mu_msg_unref (msg);
}

static void
test_mu_msg_comp_unix_programmer (void)
{
	MuMsg *msg;
	char *refs;

	msg = get_msg (MU_TESTMAILDIR4 "/181736.eml");
	g_assert_cmpstr (mu_msg_get_to(msg),
	 		 ==, NULL);
	g_assert_cmpstr (mu_msg_get_subject(msg),
			 ==, "Re: Are writes \"atomic\" to readers of the file?");
	g_assert_cmpstr (mu_msg_get_from(msg),
			 ==, "Jimbo Foobarcuux <jimbo@slp53.sl.home>");
	g_assert_cmpstr (mu_msg_get_msgid(msg),
			 ==, "oktdp.42997$Te.22361@news.usenetserver.com");

	refs = mu_str_from_list (mu_msg_get_references(msg), ',');
	g_assert_cmpstr (refs, ==,
			 "e9065dac-13c1-4103-9e31-6974ca232a89@t15g2000prt"
			 ".googlegroups.com,"
			 "87hbblwelr.fsf@sapphire.mobileactivedefense.com,"
			 "pql248-4va.ln1@wilbur.25thandClement.com,"
			 "ikns6r$li3$1@Iltempo.Update.UU.SE,"
			 "8762s0jreh.fsf@sapphire.mobileactivedefense.com,"
			 "ikqqp1$jv0$1@Iltempo.Update.UU.SE,"
			 "87hbbjc5jt.fsf@sapphire.mobileactivedefense.com,"
			 "ikr0na$lru$1@Iltempo.Update.UU.SE,"
			 "tO8cp.1228$GE6.370@news.usenetserver.com,"
			 "ikr6ks$nlf$1@Iltempo.Update.UU.SE,"
			 "8ioh48-8mu.ln1@leafnode-msgid.gclare.org.uk");
	g_free (refs);

	//"jimbo@slp53.sl.home (Jimbo Foobarcuux)";
	g_assert_cmpuint (mu_msg_get_prio(msg), /* 'low' */
			  ==, MU_MSG_PRIO_NORMAL);
	g_assert_cmpuint (mu_msg_get_date(msg),
			  ==, 1299603860);

	mu_msg_unref (msg);
}

static void
test_mu_str_prio_01 (void)
{
	g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_LOW), ==, "low");
	g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_NORMAL), ==, "normal");
	g_assert_cmpstr(mu_msg_prio_name(MU_MSG_PRIO_HIGH), ==, "high");
}

static gboolean
ignore_error (const char* log_domain, GLogLevelFlags log_level,
	      const gchar* msg, gpointer user_data)
{
	return FALSE; /* don't abort */
}

static void
test_mu_str_prio_02 (void)
{
	/* this must fail */
	g_test_log_set_fatal_handler ((GTestLogFatalFunc)ignore_error, NULL);
	g_assert_cmpstr (mu_msg_prio_name(666), ==, NULL);
}

static void
test_mu_str_display_contact (void)
{
	int			i;
	struct {
		const char*	word;
		const char*	disp;
	} words [] = {
		{ "\"Foo Bar\" <aap@noot.mies>", "Foo Bar"},
		{ "Foo Bar <aap@noot.mies>", "Foo Bar" },
		{ "<aap@noot.mies>", "aap@noot.mies" },
		{ "foo@bar.nl", "foo@bar.nl" }
	};

	for (i = 0; i != G_N_ELEMENTS(words); ++i)
		g_assert_cmpstr (mu_str_display_contact_s (words[i].word), ==,
				 words[i].disp);
}

int
main (int argc, char *argv[])
{
	int rv;

	g_test_init (&argc, &argv, NULL);

	/* mu_msg_str_date */
	g_test_add_func ("/mu-msg/mu-msg-01",
			 test_mu_msg_01);
	g_test_add_func ("/mu-msg/mu-msg-02",
			 test_mu_msg_02);
	g_test_add_func ("/mu-msg/mu-msg-03",
			 test_mu_msg_03);
	g_test_add_func ("/mu-msg/mu-msg-04",
			 test_mu_msg_04);
	g_test_add_func ("/mu-msg/mu-msg-multimime",
			 test_mu_msg_multimime);

	g_test_add_func ("/mu-msg/mu-msg-flags",
			 test_mu_msg_flags);

	g_test_add_func ("/mu-msg/mu-msg-tags",
			 test_mu_msg_tags);
	g_test_add_func ("/mu-msg/mu-msg-references",
			 test_mu_msg_references);
	g_test_add_func ("/mu-msg/mu-msg-references_dups",
			 test_mu_msg_references_dups);
	g_test_add_func ("/mu-msg/mu-msg-references_many",
			 test_mu_msg_references_many);

	g_test_add_func ("/mu-msg/mu-msg-umlaut",
			 test_mu_msg_umlaut);
	g_test_add_func ("/mu-msg/mu-msg-comp-unix-programmer",
			 test_mu_msg_comp_unix_programmer);

	/* mu_str_prio */
	g_test_add_func ("/mu-str/mu-str-prio-01",
			 test_mu_str_prio_01);
	g_test_add_func ("/mu-str/mu-str-prio-02",
			 test_mu_str_prio_02);

	g_test_add_func ("/mu-str/mu-str-display_contact",
			 test_mu_str_display_contact);

	g_log_set_handler (NULL,
			   G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL|
			   G_LOG_FLAG_RECURSION,
			   (GLogFunc)black_hole, NULL);

	rv = g_test_run ();

	return rv;
}