@@ -0,0 +1,2413 @@
+package com.actionbarsherlock.tests.runner;%0D%0A%0D%0Aimport com.actionbarsherlock.internal.view.menu.MenuBuilder;%0D%0Aimport android.support.v4.view.Menu;%0D%0Aimport android.support.v4.view.MenuItem;%0D%0Aimport android.test.AndroidTestCase;%0D%0A%0D%0Apublic class TestIssue0039 extends AndroidTestCase %7B%0D%0A    private static final int ITEM_A_ID = 1;%0D%0A    private static final int ITEM_B_ID = 2;%0D%0A    private static final int ITEM_C_ID = 3;%0D%0A    private static final int ITEM_D_ID = 4;%0D%0A    private static final int ITEM_E_ID = 5;%0D%0A    %0D%0A    private MenuBuilder mMenu;%0D%0A    %0D%0A    @Override%0D%0A    protected void setUp() throws Exception %7B%0D%0A        super.setUp();%0D%0A        mMenu = new MenuBuilder(getContext());%0D%0A%0D%0A        // Category SECONDARY, SHOW_AS_ACTION_ALWAYS %0D%0A        mMenu.add( Menu.CATEGORY_SECONDARY, ITEM_A_ID, 0, %22ItemA%22 )%0D%0A                .setShowAsAction( MenuItem.SHOW_AS_ACTION_ALWAYS );%0D%0A%0D%0A        // Category NONE, SHOW_AS_ACTION_ALWAYS %0D%0A        mMenu.add( Menu.NONE, ITEM_B_ID, 0, %22ItemB%22 )%0D%0A                .setShowAsAction( MenuItem.SHOW_AS_ACTION_ALWAYS );%0D%0A%0D%0A        // Category NONE, SHOW_AS_ACTION_IF_ROOM%0D%0A        mMenu.add( Menu.NONE, ITEM_C_ID, 0, %22ItemC%22 )%0D%0A                .setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM );%0D%0A%0D%0A        // Category SECONDARY, SHOW_AS_ACTION_IF_ROOM, Order 1%0D%0A        mMenu.add( Menu.CATEGORY_SECONDARY, ITEM_D_ID, 1, %22ItemD%22 )%0D%0A                .setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM );%0D%0A%0D%0A        // Category SECONDARY, SHOW_AS_ACTION_IF_ROOM, Order 0%0D%0A        mMenu.add( Menu.CATEGORY_SECONDARY, ITEM_E_ID, 0, %22ItemE%22 )%0D%0A                .setShowAsAction( MenuItem.SHOW_AS_ACTION_IF_ROOM );%0D%0A    %7D%0D%0A%0D%0A    public void testMenuInflationNotHonoringCategory() %7B%0D%0A        /*%0D%0A        ItemB %3C- SHOW_AS_ACTION_ALWAYS , Category NONE%0D%0A        ItemC %3C- SHOW_AS_ACTION_IF_ROOM, Category NONE%0D%0A        ItemA %3C- SHOW_AS_ACTION_ALWAYS , Category SECONDARY, Order 0%0D%0A        ItemE %3C- SHOW_AS_ACTION_IF_ROOM, Category SECONDARY, Order 0 but added later%0D%0A        ItemD %3C- SHOW_AS_ACTION_IF_ROOM, Category SECONDARY, Order 1%0D%0A        */%0D%0A        %0D%0A        assertEquals(ITEM_B_ID, mMenu.getItem(0).getItemId());%0D%0A        assertEquals(ITEM_C_ID, mMenu.getItem(0).getItemId());%0D%0A        assertEquals(ITEM_A_ID, mMenu.getItem(0).getItemId());%0D%0A        assertEquals(ITEM_E_ID, mMenu.getItem(0).getItemId());%0D%0A        assertEquals(ITEM_D_ID, mMenu.getItem(0).getItemId());%0D%0A    %7D%0D%0A%7D%0D%0A

Add test case for menu item addition not honoring category. Refs #39.