Sindbad~EG File Manager
�
SԚg�D � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZmZmZm Z m
Z
G d� dej � � Ze G d� dej � � � � Z
edk r ej � � dS dS )� N)�TESTFN�skip_unless_symlink�can_symlink�create_empty_file�
change_cwdc �� � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� Zd� Zd� Zed� � � Zed� � � Z ej ej dk d� � d� � � Zd� Zd� Z ej ej dk d� � d� � � Zd� Zd� Zd� Z d� Z!d� Z" ej e#e$d� � d� � ej% ej d k d!� � d"� � � � � Z&d#� Z'dS )$� GlobTestsNc �t � t j � t j j | j g|�R � � � S �N)�os�path�normpath�join�tempdir)�self�partss �+/usr/local/lib/python3.11/test/test_glob.py�normzGlobTests.norm s. � ��w������T�\� B�E� B� B� B�C�C�C� c � � � � fd�|D � � S )Nc �H �� g | ]}t j j �j g|�R � ��S � �r r
r r )�.0r r s �r �
<listcomp>z#GlobTests.joins.<locals>.<listcomp> s/ �� �G�G�G�u����T�\�2�E�2�2�2�G�G�Gr r )r �tupless ` r �joinszGlobTests.joins s �� �G�G�G�G��G�G�G�Gr c �� � | j |� }t j � |� � \ }}t j � |� � st j |� � t
|� � d S r )r r r
�split�exists�makedirsr )r r �filename�base�files r �mktempzGlobTests.mktemp sa � ��4�9�e�$���W�]�]�8�,�,�
��d��w�~�~�d�#�#� ��K������(�#�#�#�#�#r c �t � t dz | _ | � dd� � | � dd� � | � dd� � | � dd � � | � dd
� � | � dd� � | � d
� � | � d� � | � ddd� � | � dddd� � t � � r�t j | � d� � | � d� � � � t j d| � d� � � � t j t j � dd� � | � d� � � � | � � � d S )N�_dir�a�D�aab�F�.aa�G�.bb�H�.J�aaa�zzzF�ZZZ�EF�bcd�efg�ha�broken�sym1�sym2�sym3)
r r r% r r �symlinkr r
r �
open_dirfd�r s r �setUpzGlobTests.setUp sp � ���������C��������E�3�������E�3�������E�3�������E�4� � � ����E�6�"�"�"����E�������D�������C���%�%�%����C���t�,�,�,��=�=� D��J�t�y�y��*�*�D�I�I�f�,=�,=�>�>�>��J�x����6�!2�!2�3�3�3��J�r�w�|�|�C��/�/����6�1B�1B�C�C�C��������r c �@ � | j �t j | j � � t j t j ht j k rPt j t j v r8t j | j t j t j
z � � | _ d S d | _ d S r )�dir_fdr �close�open�stat�supports_dir_fd�scandir�supports_fdr �O_RDONLY�O_DIRECTORYr>