Add some simple tests for flag setting in add.

Signed-off-by: Magnus Therning <magnus@therning.org>