@@ -412,3 +412,36 @@ def test_max_search_matches(self, store: ObjectStore) -> None:
412412 assert "Match 2:" in result
413413 assert "Match 3:" not in result # Should be limited
414414 assert "and 2 more matches" in result
415+
416+ def test_explore_string_returns_full_string (self , store : ObjectStore , explorer : RichExplorer ) -> None :
417+ """Test that exploring a string object returns the full string without pretty formatting."""
418+ test_string = "This is a test string with special characters: \n \t quotes 'single' and double"
419+ obj_id = store .put (test_string )
420+
421+ result = explorer .explore (obj_id )
422+
423+ # Should contain the header
424+ assert f"@{ obj_id } → str" in result
425+ # Should contain the full original string without quotes or escaping
426+ assert test_string in result
427+ # The body should be exactly the string (after the header)
428+ lines = result .split ("\n \n " , 1 )
429+ body = lines [1 ] if len (lines ) > 1 else ""
430+ assert body == test_string
431+
432+ def test_explore_nested_string_returns_full_string (self , store : ObjectStore , explorer : RichExplorer ) -> None :
433+ """Test that exploring a nested string object returns the full string without pretty formatting."""
434+ test_string = "Nested string with newlines\n and tabs\t and quotes 'test'"
435+ test_data = {"content" : test_string }
436+ obj_id = store .put (test_data )
437+
438+ result = explorer .explore (obj_id , "content" )
439+
440+ # Should contain the header for the nested path
441+ assert f"@{ obj_id } .content → str" in result
442+ # Should contain the full original string
443+ assert test_string in result
444+ # Should not be wrapped in quotes like Rich Pretty would do
445+ lines = result .split ("\n \n " , 1 )
446+ body = lines [1 ] if len (lines ) > 1 else ""
447+ assert body == test_string
0 commit comments