Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_eof.cpython-311.opt-1.pyc |
�
�Ke � � � d Z ddlZddlmZ ddlmZ ddlmZ ddlZ G d� dej � � Z e
dk r ej � � dS dS ) z/test script for a few new invalid token catches� N)�support)� os_helper)�
script_helperc �l � e Zd Zd� Zd� Zd� Zd� Zd� Z ej e
j d� � d� � � ZdS ) �EOFTestCasec � � d}dD ]u} t |� d�� � t j �# t $ rH}| � t |� � |� � | � |j d� � Y d }~�nd }~ww xY wd S )NzCunterminated string literal (detected at line 1) (<string>, line 1))�'�"zthis is a test � ��evalr �
TestFailed�SyntaxError�assertEqual�str�offset)�self�expect�quote�msgs �7/usr/local/apps/python3/lib/python3.11/test/test_eof.py�test_EOF_single_quotez!EOFTestCase.test_EOF_single_quote
s� � �V�� � )� )�E�
)��%� � � � � � � �(�(�� �
0�
0�
0�� � ��S���6�2�2�2�� � ���Q�/�/�/�/�/�/�/�/�����
0���� )� )s �&�
A8�>A3�3A8c �� � d} t d� � t j �# t $ rI}| � t |� � |� � | � |j d� � Y d }~d S d }~ww xY w)NzQunterminated triple-quoted string literal (detected at line 1) (<string>, line 1)z'''this is a testr r �r r r s r � test_EOFSzEOFTestCase.test_EOFS s� � �e�� %��(�)�)�)�
�$�$�� � ,� ,� ,����S��X�X�v�.�.�.����S�Z��+�+�+�+�+�+�+�+�+����� ,���s � �
A2�>A-�-A2c �� � d}t j � � 5 }t j |dd� � }t j |� � \ }}}d d d � � n# 1 swxY w Y | � d|� � d S )Nz(<string>, line 1)�fooz'''this is
a
tests>