From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Mendler Newsgroups: gmane.emacs.devel Subject: Re: [elpa] externals/compat 9600545c54 6/6: Add test for temporary-file-directory Date: Mon, 16 Jan 2023 15:08:31 +0100 Message-ID: References: <167387024599.18919.16349114791137926023@vcs2.savannah.gnu.org> <20230116115727.25BB4C04965@vcs2.savannah.gnu.org> <87sfgallu8.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3441"; mail-complaints-to="usenet@ciao.gmane.io" To: Michael Albinus , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Jan 16 15:09:49 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHQBI-0000eg-66 for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Jan 2023 15:09:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHQAY-0000iF-F6; Mon, 16 Jan 2023 09:09:02 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHQAS-0000h4-Si for emacs-devel@gnu.org; Mon, 16 Jan 2023 09:08:57 -0500 Original-Received: from server.qxqx.de ([2a01:4f8:121:346::180] helo=mail.qxqx.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHQAQ-0001cF-AM for emacs-devel@gnu.org; Mon, 16 Jan 2023 09:08:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=qxqx.de; s=mail1392553390; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Lyf8K/Y1j0qrTA/mvPQ6TJ7u8JJ36L1VQkvNj5Kmv1U=; b=cTHL+Xtcz0UvP6gGZbnHuq2KDr GbbfquECmelReURY+DoBl+nleU9DA2LDGJMGzPVqbw2soAJHgzucSwIuXhlyPJaBAbjP7gs4t/uXU Aq0E02VeRqUIgcRBE/MS/smQtiE8vSqrkm8LgejzwYVr5DHAQoQyPOXI1bL0Hmj0m9/0=; Content-Language: en-US In-Reply-To: <87sfgallu8.fsf@gmx.de> Received-SPF: pass client-ip=2a01:4f8:121:346::180; envelope-from=mail@daniel-mendler.de; helo=mail.qxqx.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:302454 Archived-At: Hi Michael! On 1/16/23 13:12, Michael Albinus wrote: >> +(ert-deftest temporary-file-directory () >> + (should-equal (temporary-file-directory) temporary-file-directory) >> + (let ((default-directory "/mnt")) >> + (should-equal (temporary-file-directory) default-directory)) >> + ;; TODO how can we test tramp? >> + ;;(let ((default-directory "/sudo:/")) >> + ;; (should-equal (temporary-file-directory) temporary-file-directory)) >> + ;;(let ((default-directory "/ssh:does-not-exist:/")) >> + ;; (should-equal (temporary-file-directory) "/ssh:does-not-exist:/tmp/")) > > See ert-remote-temporary-file-directory in ert-x.el. > > Best regards, Michael. Thank you for the info. Btw, did you consider using the Compat library in Tramp? A lot of the backported functionality in tramp-compat should be already present in Compat. Daniel