"Indeed, We have tried them," meaning: the people of Makkah were tried with famine when they belied the Prophet, "as We tried the companions of the garden." Al-Kalbi's interpretation is that they were the sons of righteous people, and that their fathers used to set aside a portion of their garden for the poor and the wayfarers, but those who succeeded them...
﴿إِنَّا بلوناهم﴾ يَعْنِي: أَهْلَ مَكَّةَ ابْتُلُوا بِالْجُوعِ حِينَ كذَّبوا النَّبِيَّ ﴿كَمَا بَلَوْنَا أَصْحَاب الْجنَّة﴾ تَفْسِيرُ الْكَلْبِيِّ: أَنَّهُمْ كَانُوا أَبْنَاءَ قَوْمٍ صَالِحِينَ، وَأَنَّ آبَاءَهُمْ كَانُوا جَعَلُوا مِنْ جَنَّتِهِمْ حَظًّا لِلْمَسَاكِينِ وَأَبْنَاءِ السَّبِيلِ، فَخَلَفَ مِنْ بَعْدِهِمْ